diff options
author | drh <drh@noemail.net> | 2019-02-20 12:52:47 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-02-20 12:52:47 +0000 |
commit | 042666e4fa379ddd29eb049d77319e32dc94126f (patch) | |
tree | e206def6e8da89383cdc6104e01a2ac1c666ef48 /src | |
parent | 2a98b586c8f4c9b00e64d77668917ce8fc0304b9 (diff) | |
download | sqlite-042666e4fa379ddd29eb049d77319e32dc94126f.tar.gz sqlite-042666e4fa379ddd29eb049d77319e32dc94126f.zip |
When an IN operator drives a query loop, mark it as "CODED" so that it
will not be used afterwards for a (pointless) membership test. This is
a better fix for ticket [df46dfb631f75694] than the previous fix that is
now on a branch as it preserves the full optimization of
check-in [e130319317e76119].
FossilOrigin-Name: fa792714ae62fa980f1767acc6d622a6727ceb677870243c88548423795dcb5b
Diffstat (limited to 'src')
-rw-r--r-- | src/wherecode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wherecode.c b/src/wherecode.c index 19315779b..5441752ed 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -1344,6 +1344,7 @@ Bitmask sqlite3WhereCodeOneLoopStart( sqlite3VdbeAddOp3(v, OP_SeekRowid, iCur, addrNxt, iRowidReg); VdbeCoverage(v); pLevel->op = OP_Noop; + pTerm->wtFlags |= TERM_CODED; }else if( (pLoop->wsFlags & WHERE_IPK)!=0 && (pLoop->wsFlags & WHERE_COLUMN_RANGE)!=0 ){ |