Skip to content

Commit b548636

Browse files
author
mkharitonov
committed
[PGPRO-11557] Fix infinite loop with multiple ORDER BY in RUM scan
1 parent cbf80ab commit b548636

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy