aboutsummaryrefslogtreecommitdiff
path: root/src/where.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-05-01 17:22:38 +0000
committerdrh <drh@noemail.net>2013-05-01 17:22:38 +0000
commit5c10f3b38e3930ec9937f8867d12fe431e3de2bc (patch)
treef613cb4d855a9f6a91c38235d9dce9e051a2a15d /src/where.c
parent9a1eccb621ad48bc606019a1fb18220069af38af (diff)
downloadsqlite-5c10f3b38e3930ec9937f8867d12fe431e3de2bc.tar.gz
sqlite-5c10f3b38e3930ec9937f8867d12fe431e3de2bc.zip
Avoid redundant constraint checking due to transitive constraints.
FossilOrigin-Name: 329478cbed06f93652de50abdb31a6b41af02b9e
Diffstat (limited to 'src/where.c')
-rw-r--r--src/where.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/where.c b/src/where.c
index d70205205..62f9af676 100644
--- a/src/where.c
+++ b/src/where.c
@@ -4883,6 +4883,7 @@ static Bitmask codeOneLoopStart(
assert( (pTerm->prereqRight & newNotReady)!=0 );
pAlt = findTerm(pWC, iCur, pTerm->u.leftColumn, notReady, WO_EQ|WO_IN, 0);
if( pAlt==0 ) continue;
+ if( pAlt->wtFlags & (TERM_CODED) ) continue;
VdbeNoopComment((v, "begin transitive constraint"));
sEq = *pAlt->pExpr;
sEq.pLeft = pE->pLeft;