diff options
author | drh <> | 2022-06-21 18:38:18 +0000 |
---|---|---|
committer | drh <> | 2022-06-21 18:38:18 +0000 |
commit | 8c44962aaffa59d579db49b44c085dbdb108af34 (patch) | |
tree | 45eedabdb0666428b000920220e6f1e4b02975bc /src | |
parent | b9294de1e6e4ff73b3f1d045d0325d5a54fb90f8 (diff) | |
download | sqlite-8c44962aaffa59d579db49b44c085dbdb108af34.tar.gz sqlite-8c44962aaffa59d579db49b44c085dbdb108af34.zip |
Disable the short-cut query planner if the NOT INDEXED modifier is used.
[forum:/forumpost/454d706296|Forum post 454d706296].
FossilOrigin-Name: bd87d107fe474ceeac8bacb01c80bc479edbc2ae4e30697bf54ab91a5a8d2a98
Diffstat (limited to 'src')
-rw-r--r-- | src/where.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c index 196c508b0..4095a5213 100644 --- a/src/where.c +++ b/src/where.c @@ -5083,7 +5083,11 @@ static int whereShortCut(WhereLoopBuilder *pBuilder){ pItem = pWInfo->pTabList->a; pTab = pItem->pTab; if( IsVirtual(pTab) ) return 0; - if( pItem->fg.isIndexedBy ) return 0; + if( pItem->fg.isIndexedBy || pItem->fg.notIndexed ){ + testcase( pItem->fg.isIndexedBy ); + testcase( pItem->fg.notIndexed ); + return 0; + } iCur = pItem->iCursor; pWC = &pWInfo->sWC; pLoop = pBuilder->pNew; |