1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Futher improvements to LEFT JOIN strength reduction.

FossilOrigin-Name: 8a39167bd2d46496f7484cfec371e4bad22da882209b01da9459c4ed5877da25
This commit is contained in:
drh
2019-10-11 17:14:40 +00:00
parent 4a254f98e3
commit a1698993e6
3 changed files with 12 additions and 10 deletions

View File

@@ -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;