Fix the NOT NULL logic in the theorem prover that determines when a partial
index can be used. Ticket [5c6955204c392ae763a95].
FossilOrigin-Name: c2e439bccc40825e211bfa9a88e6a251ff066ca7453d4e7cb5eab56ce7332635
diff --git a/src/expr.c b/src/expr.c
index ca63eb6..940abc1 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -4943,7 +4943,11 @@
){
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;