]> 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:43 +0000 (14:21 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Jun 2005 14:21:43 +0000 (14:21 +0000)
commit2b91c8cf007e1008f7d6ccc9813908d30af8b4c0
tree026df0329e00a88a369d0e8a7c4e154b960d05a4
parente4ce3e76ce300e9e732c511c9b3e9bf98d02fd9c
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