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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user