[postgis-tickets] r15741 - #3731, backend crash on zero size stats histogram
Paul Ramsey
pramsey at cleverelephant.ca
Thu Sep 14 15:58:57 PDT 2017
Author: pramsey
Date: 2017-09-14 15:58:57 -0700 (Thu, 14 Sep 2017)
New Revision: 15741
Modified:
branches/2.2/postgis/gserialized_estimate.c
Log:
#3731, backend crash on zero size stats histogram
Modified: branches/2.2/postgis/gserialized_estimate.c
===================================================================
--- branches/2.2/postgis/gserialized_estimate.c 2017-09-14 22:58:42 UTC (rev 15740)
+++ branches/2.2/postgis/gserialized_estimate.c 2017-09-14 22:58:57 UTC (rev 15741)
@@ -1499,7 +1499,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