mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Fix the NOT NULL logic in the theorem prover that determines when a partial
index can be used. Ticket [5c6955204c392ae763a95]. FossilOrigin-Name: c2e439bccc40825e211bfa9a88e6a251ff066ca7453d4e7cb5eab56ce7332635
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user