1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Do not attempt to walk a TokenOnly or SpanOnly expression tree node.

Ticket #3791. (CVS 6469)

FossilOrigin-Name: 8362d883248f00a8ec7294bf027fd19758aec5f2
This commit is contained in:
drh
2009-04-08 12:21:30 +00:00
parent 7e3ff5d84e
commit 0a9aa2253c
4 changed files with 41 additions and 9 deletions

View File

@@ -12,7 +12,7 @@
** This file contains routines used for walking the parser tree for
** an SQL statement.
**
** $Id: walker.c,v 1.2 2009/02/19 14:39:25 danielk1977 Exp $
** $Id: walker.c,v 1.3 2009/04/08 12:21:31 drh Exp $
*/
#include "sqliteInt.h"
#include <stdlib.h>
@@ -41,8 +41,11 @@
int sqlite3WalkExpr(Walker *pWalker, Expr *pExpr){
int rc;
if( pExpr==0 ) return WRC_Continue;
testcase( ExprHasProperty(pExpr, EP_TokenOnly) );
testcase( ExprHasProperty(pExpr, EP_SpanOnly) );
testcase( ExprHasProperty(pExpr, EP_Reduced) );
rc = pWalker->xExprCallback(pWalker, pExpr);
if( rc==WRC_Continue ){
if( rc==WRC_Continue && !ExprHasAnyProperty(pExpr,EP_TokenOnly|EP_SpanOnly) ){
if( sqlite3WalkExpr(pWalker, pExpr->pLeft) ) return WRC_Abort;
if( sqlite3WalkExpr(pWalker, pExpr->pRight) ) return WRC_Abort;
if( ExprHasProperty(pExpr, EP_xIsSelect) ){