]> 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:37 +0000 (14:21 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Jun 2005 14:21:37 +0000 (14:21 +0000)
commitd4b7dfacfa80cf9df9a2054f53aee59e8edc9bfc
tree8fb77d15ca727147fa96e610724afe240d94dbd6
parent8154f06301e94c431b78f108fba87c8a2fbed5a2
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