mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Improvements to the LEFT JOIN strength reduction optimization.
FossilOrigin-Name: 548082dfab5d9484279ccc11cd2833ac131b54b7481372b576d7c28bbb3294ea
This commit is contained in:
@@ -5231,8 +5231,12 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){
|
||||
int sqlite3ExprImpliesNonNullRow(Expr *p, int iTab){
|
||||
Walker w;
|
||||
p = sqlite3ExprSkipCollateAndLikely(p);
|
||||
if( p && p->op==TK_NOTNULL ){
|
||||
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;
|
||||
}
|
||||
w.xExprCallback = impliesNotNullRow;
|
||||
w.xSelectCallback = 0;
|
||||
|
||||
Reference in New Issue
Block a user