aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c
index 2f0fe4a58..2def950f2 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -490,11 +490,11 @@ void sqlite3ExprAttachSubtrees(
}else{
if( pRight ){
pRoot->pRight = pRight;
- pRoot->flags |= EP_Collate & pRight->flags;
+ pRoot->flags |= EP_Propagate & pRight->flags;
}
if( pLeft ){
pRoot->pLeft = pLeft;
- pRoot->flags |= EP_Collate & pLeft->flags;
+ pRoot->flags |= EP_Propagate & pLeft->flags;
}
exprSetHeight(pRoot);
}
@@ -1210,6 +1210,19 @@ void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
}
/*
+** Return TRUE if any expression in ExprList has any of the EP_*
+** properties given by "m"
+*/
+int sqlite3AnyExprListHasProperty(const ExprList *pList, u32 m){
+ int i;
+ if( pList==0 ) return 0;
+ for(i=0; i<pList->nExpr; i++){
+ if( ExprHasProperty(pList->a[i].pExpr, m) ) return 1;
+ }
+ return 0;
+}
+
+/*
** These routines are Walker callbacks used to check expressions to
** see if they are "constant" for some definition of constant. The
** Walker.eCode value determines the type of "constant" we are looking