| Index: third_party/sqlite/src/src/walker.c
|
| diff --git a/third_party/sqlite/src/src/walker.c b/third_party/sqlite/src/src/walker.c
|
| index 81e0f2cd60b85ea72bbaa4c877a9cbd9029d0503..d1b1e96a2d1eb7908ad32673bf7880cde4bb2fad 100644
|
| --- a/third_party/sqlite/src/src/walker.c
|
| +++ b/third_party/sqlite/src/src/walker.c
|
| @@ -36,23 +36,25 @@
|
| ** The return value from this routine is WRC_Abort to abandon the tree walk
|
| ** and WRC_Continue to continue.
|
| */
|
| -int sqlite3WalkExpr(Walker *pWalker, Expr *pExpr){
|
| +static SQLITE_NOINLINE int walkExpr(Walker *pWalker, Expr *pExpr){
|
| int rc;
|
| - if( pExpr==0 ) return WRC_Continue;
|
| testcase( ExprHasProperty(pExpr, EP_TokenOnly) );
|
| testcase( ExprHasProperty(pExpr, EP_Reduced) );
|
| rc = pWalker->xExprCallback(pWalker, pExpr);
|
| - if( rc==WRC_Continue
|
| - && !ExprHasProperty(pExpr,EP_TokenOnly) ){
|
| - if( sqlite3WalkExpr(pWalker, pExpr->pLeft) ) return WRC_Abort;
|
| - if( sqlite3WalkExpr(pWalker, pExpr->pRight) ) return WRC_Abort;
|
| - if( ExprHasProperty(pExpr, EP_xIsSelect) ){
|
| - if( sqlite3WalkSelect(pWalker, pExpr->x.pSelect) ) return WRC_Abort;
|
| - }else{
|
| - if( sqlite3WalkExprList(pWalker, pExpr->x.pList) ) return WRC_Abort;
|
| - }
|
| + if( rc || ExprHasProperty(pExpr,(EP_TokenOnly|EP_Leaf)) ){
|
| + return rc & WRC_Abort;
|
| }
|
| - 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) ){
|
| + if( sqlite3WalkSelect(pWalker, pExpr->x.pSelect) ) return WRC_Abort;
|
| + }else if( pExpr->x.pList ){
|
| + if( sqlite3WalkExprList(pWalker, pExpr->x.pList) ) return WRC_Abort;
|
| + }
|
| + return WRC_Continue;
|
| +}
|
| +int sqlite3WalkExpr(Walker *pWalker, Expr *pExpr){
|
| + return pExpr ? walkExpr(pWalker,pExpr) : WRC_Continue;
|
| }
|
|
|
| /*
|
|
|