From 664d6d139eb0ed6ec51aef76db4e22e7f41bc31c Mon Sep 17 00:00:00 2001 From: drh Date: Sat, 4 May 2019 17:32:07 +0000 Subject: Fix the NOT NULL logic in the theorem prover that determines when a partial index can be used. Ticket [5c6955204c392ae763a95]. FossilOrigin-Name: c2e439bccc40825e211bfa9a88e6a251ff066ca7453d4e7cb5eab56ce7332635 --- src/expr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/expr.c') 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; -- cgit v1.2.3