aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-10-11 17:14:40 +0000
committerdrh <drh@noemail.net>2019-10-11 17:14:40 +0000
commita1698993e6c84613e873929693f7886e151f30d9 (patch)
tree29f2f1d3dad58740cfadfda1505f07e2ce8a66d1 /src/expr.c
parent4a254f98e3fc2b214127f1714d27a2eccc4f7fda (diff)
downloadsqlite-a1698993e6c84613e873929693f7886e151f30d9.tar.gz
sqlite-a1698993e6c84613e873929693f7886e151f30d9.zip
Futher improvements to LEFT JOIN strength reduction.
FossilOrigin-Name: 8a39167bd2d46496f7484cfec371e4bad22da882209b01da9459c4ed5877da25
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c
index e28a7b044..0e827482b 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -5234,9 +5234,11 @@ int sqlite3ExprImpliesNonNullRow(Expr *p, int iTab){
if( p==0 ) return 0;
if( p->op==TK_NOTNULL ){
p = p->pLeft;
- }else if( p->op==TK_AND ){
- if( sqlite3ExprImpliesNonNullRow(p->pLeft, iTab) ) return 1;
- p = p->pRight;
+ }else{
+ while( p->op==TK_AND ){
+ if( sqlite3ExprImpliesNonNullRow(p->pLeft, iTab) ) return 1;
+ p = p->pRight;
+ }
}
w.xExprCallback = impliesNotNullRow;
w.xSelectCallback = 0;