~ubuntu-branches/ubuntu/trusty/postgis/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/joinsel-issue2543

  • Committer: Package Import Robot
  • Author(s): Markus Wanner
  • Date: 2014-01-14 22:18:56 UTC
  • Revision ID: package-import@ubuntu.com-20140114221856-u1211p9cl9bwfaom
Tags: 2.1.1-3
* Fix FTBFS on at least powerpc and mips by commenting out a few tests
  that check against a serialized representation, which is architecture
  dependent.
* Apply (experimental) upstream patch preventing against selectivity
  estimates bigger than 1.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Apply proposed patch from upstream bug #2543
 
2
 Not quite how important upstream issue #2543 is in the wild, but the
 
3
 proposed fix seems save in any case. On MIPS, I occasionally see very
 
4
 high selectivity values, with indicates a bug. For now, let's just
 
5
 cap the selectivity at 1.0.
 
6
Author: Paul Ramsey <pramsey@cleverelephant.ca>
 
7
Bug: http://trac.osgeo.org/postgis/ticket/2543
 
8
Origin: upstream, http://trac.osgeo.org/postgis/attachment/ticket/2543/joinsel.patch
 
9
Last-Update: 2013-11-13
 
10
 
 
11
--- a/postgis/gserialized_estimate.c
 
12
+++ b/postgis/gserialized_estimate.c
 
13
@@ -1075,6 +1075,10 @@
 
14
         */
 
15
        selectivity = val / ntuples_max;
 
16
        
 
17
+       /* Guard against over-estimates :) */ 
 
18
+       if ( selectivity > 1.0 )  
 
19
+               selectivity = 1.0;      
 
20
+
 
21
        return selectivity;
 
22
 }
 
23