From ca6c1a3bd363d64130fbf870635d846c04c9aa75 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Thu, 4 Dec 2008 11:10:06 +0000 Subject: [PATCH] Initialize GISTScanOpaque->qual_ok even if there is no conditions. --- src/backend/access/gist/gistscan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/access/gist/gistscan.c b/src/backend/access/gist/gistscan.c index 0776a95b1c..730c10a029 100644 --- a/src/backend/access/gist/gistscan.c +++ b/src/backend/access/gist/gistscan.c @@ -84,6 +84,8 @@ gistrescan(PG_FUNCTION_ARGS) ItemPointerSetInvalid(&so->markpos); so->nPageData = so->curPageData = 0; + so->qual_ok = true; + /* Update scan key, if a new one is given */ if (key && scan->numberOfKeys > 0) { @@ -100,7 +102,6 @@ gistrescan(PG_FUNCTION_ARGS) * Next, if any of keys is a NULL and that key is not marked with * SK_SEARCHNULL then nothing can be found. */ - so->qual_ok = true; for (i = 0; i < scan->numberOfKeys; i++) { scan->keyData[i].sk_func = so->giststate->consistentFn[scan->keyData[i].sk_attno - 1]; -- 2.39.5