]> 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:16 +0000 (14:21 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Jun 2005 14:21:16 +0000 (14:21 +0000)
commit1265724ff5abb1dcf468cb33153ae1326426d7a6
treea3775946942cf07ffdc1fee4a6b8ace455e5a8d8
parent37c839365c566c9e8d7e96cea79e535281144224
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