mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-13 19:57:53 +08:00
Fix rescan of IndexScan node with the new lossy GiST distance functions.
Must reset the "reached end" flag and reorder queue at rescan. Per report from Regina Obe, bug #13349
This commit is contained in:
parent
266b6984cd
commit
12e6c5a6ca
@ -532,10 +532,18 @@ ExecReScanIndexScan(IndexScanState *node)
|
||||
}
|
||||
node->iss_RuntimeKeysReady = true;
|
||||
|
||||
/* flush the reorder queue */
|
||||
if (node->iss_ReorderQueue)
|
||||
{
|
||||
while (!pairingheap_is_empty(node->iss_ReorderQueue))
|
||||
reorderqueue_pop(node);
|
||||
}
|
||||
|
||||
/* reset index scan */
|
||||
index_rescan(node->iss_ScanDesc,
|
||||
node->iss_ScanKeys, node->iss_NumScanKeys,
|
||||
node->iss_OrderByKeys, node->iss_NumOrderByKeys);
|
||||
node->iss_ReachedEnd = false;
|
||||
|
||||
ExecScanReScan(&node->ss);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user