pgsql: The random selection in function linear() could deliver a value

Started by Tom Laneabout 21 years ago1 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Log Message:
-----------
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.

Tags:
----
REL7_2_STABLE

Modified Files:
--------------
pgsql/src/backend/optimizer/geqo:
geqo_selection.c (r1.12 -> r1.12.4.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/geqo/geqo_selection.c.diff?r1=1.12&r2=1.12.4.1)