aboutsummaryrefslogtreecommitdiff
path: root/src/where.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/where.c')
-rw-r--r--src/where.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c
index d70205205..2de894c3e 100644
--- a/src/where.c
+++ b/src/where.c
@@ -705,7 +705,7 @@ static WhereTerm *findTerm(
continue;
}
}
- if( pTerm->prereqRight==0 ){
+ if( pTerm->prereqRight==0 && (pTerm->eOperator&WO_EQ)!=0 ){
pResult = pTerm;
goto findTerm_success;
}else if( pResult==0 ){
@@ -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;