1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-05 09:19:17 +03:00

Fix indefinit loop in rank_cd for some corner queries.

Per Daniele Varrazzo <piro@develer.com> bug report.
This commit is contained in:
Teodor Sigaev 2007-09-07 16:26:59 +00:00
parent 7cee08efee
commit eb22ca6f9f

View File

@ -508,7 +508,7 @@ Cover(DocRepresentation * doc, int len, QUERYTYPE * query, Extention * ext)
ptr = doc + lastpos;
/* find lower bound of cover from founded upper bound, move down */
while (ptr >= doc)
while (ptr >= doc + ext->pos)
{
for (i = 0; i < ptr->nitem; i++)
ptr->item[i]->istrue = 1;