aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordan <Dan Kennedy>2021-04-05 16:20:59 +0000
committerdan <Dan Kennedy>2021-04-05 16:20:59 +0000
commit240e36c0e30920ac97fc12caae53d0a786b522f8 (patch)
tree268cd42e64b8c3bcbcc55b385a539d8d1434e6a5 /src/wherecode.c
parentd5e7fff2ca32920e628a40d9f0337af00b0c1f78 (diff)
downloadsqlite-240e36c0e30920ac97fc12caae53d0a786b522f8.tar.gz
sqlite-240e36c0e30920ac97fc12caae53d0a786b522f8.zip
Avoid coding unindexed WHERE constraints if an equivalent transitive term has already been coded by an outer loop.
FossilOrigin-Name: 644bb77f8bb2c3499db7c280440c92fd2649a98ce714ae0d5d690eabfdc04326
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 771a50fc7..86113caeb 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -2448,6 +2448,7 @@ Bitmask sqlite3WhereCodeOneLoopStart(
sEAlt = *pAlt->pExpr;
sEAlt.pLeft = pE->pLeft;
sqlite3ExprIfFalse(pParse, &sEAlt, addrCont, SQLITE_JUMPIFNULL);
+ pAlt->wtFlags |= TERM_CODED;
}
/* For a LEFT OUTER JOIN, generate code that will record the fact that