aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2019-08-29 15:06:35 +0000
committerdan <dan@noemail.net>2019-08-29 15:06:35 +0000
commit1cd382e3500588126a91692377254bb807276d83 (patch)
treeb99c780d8c39dd27a6d5821a07918c5e09ec2fa8 /src/expr.c
parent50b3ea2daf855d61d3a56562d3e2bfc843e06823 (diff)
downloadsqlite-1cd382e3500588126a91692377254bb807276d83.tar.gz
sqlite-1cd382e3500588126a91692377254bb807276d83.zip
Avoid assuming that for "~ (? OR TRUE)" to be true, "?" must not be NULL, just as we do for "NOT (? OR TRUE)". Fix for ticket [c0390363].
FossilOrigin-Name: 84ae41fd2f50cb7c0c3f6522d0f94817e1bbf96eae5316279e3e32cee4e46e91
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c
index 365f60665..d83e18eb2 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -5027,7 +5027,6 @@ static int exprImpliesNotNull(
}
case TK_SPAN:
case TK_COLLATE:
- case TK_BITNOT:
case TK_UPLUS:
case TK_UMINUS: {
return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, seenNot);
@@ -5037,6 +5036,7 @@ static int exprImpliesNotNull(
if( p->op2!=TK_IS ) return 0;
return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, seenNot);
}
+ case TK_BITNOT:
case TK_NOT: {
return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, 1);
}