projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
266b698
)
Fix rescan of IndexScan node with the new lossy GiST distance functions.
author
Heikki Linnakangas
Mon, 25 May 2015 11:42:21 +0000
(14:42 +0300)
committer
Heikki Linnakangas
Mon, 25 May 2015 11:48:29 +0000
(14:48 +0300)
Must reset the "reached end" flag and reorder queue at rescan.
Per report from Regina Obe, bug #13349
src/backend/executor/nodeIndexscan.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/executor/nodeIndexscan.c
b/src/backend/executor/nodeIndexscan.c
index 7fd90415f96d0ccd12cdd065066f3c0abf1893ca..c0f14dbfa9d566f4c47973f2f5d01cb52c699cab 100644
(file)
--- a/
src/backend/executor/nodeIndexscan.c
+++ b/
src/backend/executor/nodeIndexscan.c
@@
-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);
}