]> granicus.if.org Git - postgresql/commit
The random selection in function linear() could deliver a value equal to max
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Jun 2005 14:21:23 +0000 (14:21 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Jun 2005 14:21:23 +0000 (14:21 +0000)
commitd9de1bb47a234a322e66cbefa4ae645fe4622545
tree2f0c347e547dc443ad24e3ca26554b3258bcd042
parent8bedb71888a2f08ced7e017f090775eb2746eed4
The random selection in function linear() could deliver a value equal to max
if geqo_rand() returns exactly 1.0, resulting in failure due to indexing
off the end of the pool array.  Also, since this is using inexact float math,
it seems wise to guard against roundoff error producing values slightly
outside the expected range.  Per report from bug@zedware.org.
src/backend/optimizer/geqo/geqo_selection.c