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)
commit92ad7e5752a9fb241be162a4ec5986276c9ce5f9
treec8fbac8e699d829958bed4f0c72c6caaf1fcef7d
parentf8772a9473eb4f0e61c893bc0443f3801467ab9b
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