mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Add the EP_Leaf flag bit to the Expr.flags field to indicate Expr
nodes that do not have substructure. Use that bit to avoid unnecessary recursion. FossilOrigin-Name: 8a6ea455cd1bf42ae0a7f1f1789baf88d782db13
This commit is contained in:
@@ -41,7 +41,9 @@ static SQLITE_NOINLINE int walkExpr(Walker *pWalker, Expr *pExpr){
|
||||
testcase( ExprHasProperty(pExpr, EP_TokenOnly) );
|
||||
testcase( ExprHasProperty(pExpr, EP_Reduced) );
|
||||
rc = pWalker->xExprCallback(pWalker, pExpr);
|
||||
if( rc || ExprHasProperty(pExpr,EP_TokenOnly) ) return rc & WRC_Abort;
|
||||
if( rc || ExprHasProperty(pExpr,(EP_TokenOnly|EP_Leaf)) ){
|
||||
return rc & WRC_Abort;
|
||||
}
|
||||
if( pExpr->pLeft && walkExpr(pWalker, pExpr->pLeft) ) return WRC_Abort;
|
||||
if( pExpr->pRight && walkExpr(pWalker, pExpr->pRight) ) return WRC_Abort;
|
||||
if( ExprHasProperty(pExpr, EP_xIsSelect) ){
|
||||
|
Reference in New Issue
Block a user