diff options
author | drh <drh@noemail.net> | 2019-05-04 17:32:07 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-05-04 17:32:07 +0000 |
commit | 664d6d139eb0ed6ec51aef76db4e22e7f41bc31c (patch) | |
tree | 54ed5a22b2bcc6e67abc2b5f64c81a373d6cd710 /src/expr.c | |
parent | bc8b231098ae2cbc7528370ab722579f5d3b23fc (diff) | |
download | sqlite-664d6d139eb0ed6ec51aef76db4e22e7f41bc31c.tar.gz sqlite-664d6d139eb0ed6ec51aef76db4e22e7f41bc31c.zip |
Fix the NOT NULL logic in the theorem prover that determines when a partial
index can be used. Ticket [5c6955204c392ae763a95].
FossilOrigin-Name: c2e439bccc40825e211bfa9a88e6a251ff066ca7453d4e7cb5eab56ce7332635
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c index ca63eb66c..940abc1ae 100644 --- a/src/expr.c +++ b/src/expr.c @@ -4943,7 +4943,11 @@ int sqlite3ExprImpliesExpr(Parse *pParse, Expr *pE1, Expr *pE2, int iTab){ ){ return 1; } - if( pE2->op==TK_NOTNULL && pE1->op!=TK_ISNULL && pE1->op!=TK_IS ){ + if( pE2->op==TK_NOTNULL + && pE1->op!=TK_ISNULL + && pE1->op!=TK_IS + && pE1->op!=TK_OR + ){ Expr *pX = sqlite3ExprSkipCollate(pE1->pLeft); testcase( pX!=pE1->pLeft ); if( sqlite3ExprCompare(pParse, pX, pE2->pLeft, iTab)==0 ) return 1; |