8000 [PGPRO-11557] Fix infinite loop with multiple ORDER BY in RUM scan · postgrespro/rum@337b60e · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 337b60e

Browse files
mkharitonovMikhail Kharitonov
mkharitonov
authored and
Mikhail Kharitonov
committed
[PGPRO-11557] Fix infinite loop with multiple ORDER BY in RUM scan
1 parent cbf80ab commit 337b60e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/rumget.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,11 @@ entryFindItem(RumState * rumstate, RumScanEntry entry, RumItem * item, Snapshot
17411741
{
17421742
if (compareRumItemScanDirection(rumstate, entry->attnumOrig,
17431743
entry->scanDirection,
1744-
&entry->curItem, item) >= 0)
1744+
&entry->curItem, item) >= 0 &&
1745+
entry->offset >= 0 &&
1746+
entry->offset < entry->nlist &&
1747+
rumCompareItemPointers(&entry->curItem.iptr,
1748+
&entry->list[entry->offset].iptr) == 0)
17451749
return;
17461750
while (entry->offset >= 0 && entry->offset < entry->nlist)
17471751
{

0 commit comments

Comments
 (0)
0