[postgis-tickets] r15739 - #3731, backend crash on stats object with zero-size histogram
Paul Ramsey
pramsey at cleverelephant.ca
Thu Sep 14 15:57:55 PDT 2017
Author: pramsey
Date: 2017-09-14 15:57:54 -0700 (Thu, 14 Sep 2017)
New Revision: 15739
Modified:
trunk/postgis/gserialized_estimate.c
Log:
#3731, backend crash on stats object with zero-size histogram
Modified: trunk/postgis/gserialized_estimate.c
===================================================================
--- trunk/postgis/gserialized_estimate.c 2017-09-14 22:30:44 UTC (rev 15738)
+++ trunk/postgis/gserialized_estimate.c 2017-09-14 22:57:54 UTC (rev 15739)
@@ -1561,7 +1561,7 @@
histo_cells_new = 1;
for ( d = 0; d < ndims; d++ )
{
- histo_size[d] = (int)pow((double)histo_cells_target, 1/(double)ndims);
+ histo_size[d] = 1 + (int)pow((double)histo_cells_target, 1/(double)ndims);
POSTGIS_DEBUGF(3, " histo_size[d]: %d", histo_size[d]);
histo_cells_new *= histo_size[d];
}
More information about the postgis-tickets
mailing list