Обсуждение: pgsql: The random selection in function linear() could deliver a value

Поиск
Список
Период
Сортировка

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

От
tgl@svr1.postgresql.org (Tom Lane)
Дата:
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_3_STABLE

Modified Files:
--------------
    pgsql/src/backend/optimizer/geqo:
        geqo_selection.c (r1.14 -> r1.14.2.1)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/geqo/geqo_selection.c.diff?r1=1.14&r2=1.14.2.1)