From 990ea8afa1d36aab17380ca98be15e2502f215fa 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 377bf7749d..c42c170a72 100644 --- a/src/backend/access/gist/gistscan.c +++ b/src/backend/access/gist/gistscan.c @@ -76,6 +76,8 @@ gistrescan(PG_FUNCTION_ARGS) ItemPointerSetInvalid(&so->curpos); so->nPageData = so->curPageData = 0; + so->qual_ok = true; + /* Update scan key, if a new one is given */ if (key && scan->numberOfKeys > 0) { @@ -92,7 +94,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