diff options
author | dan <dan@noemail.net> | 2019-10-09 21:14:00 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2019-10-09 21:14:00 +0000 |
commit | da03c1e65e449ee4f0f685b63c6906ad3d7ac2a9 (patch) | |
tree | 9ebd9938000b90f3f00dae58d865b436c0173429 /src | |
parent | ae55737fbf98963accbb1b9a26250cd6f08a4ce5 (diff) | |
download | sqlite-da03c1e65e449ee4f0f685b63c6906ad3d7ac2a9.tar.gz sqlite-da03c1e65e449ee4f0f685b63c6906ad3d7ac2a9.zip |
Avoid assuming that an expression that contains the sub-expression (? IS FALSE) or (? IS TRUE) may only be true if ? is non-null. Fix for [a976c487].
FossilOrigin-Name: eb7ed90b8a65748f0721aaf7bdddd2207f552be5015603fbfb7044d815ae2f36
Diffstat (limited to 'src')
-rw-r--r-- | src/expr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c index fd6b57128..ba19a331d 100644 --- a/src/expr.c +++ b/src/expr.c @@ -5149,6 +5149,7 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){ case TK_CASE: case TK_IN: case TK_FUNCTION: + case TK_TRUTH: testcase( pExpr->op==TK_ISNOT ); testcase( pExpr->op==TK_ISNULL ); testcase( pExpr->op==TK_NOTNULL ); @@ -5157,6 +5158,7 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){ testcase( pExpr->op==TK_CASE ); testcase( pExpr->op==TK_IN ); testcase( pExpr->op==TK_FUNCTION ); + testcase( pExpr->op==TK_TRUTH ); return WRC_Prune; case TK_COLUMN: if( pWalker->u.iCur==pExpr->iTable ){ |