aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-02-09 15:21:36 +0000
committerdrh <drh@noemail.net>2015-02-09 15:21:36 +0000
commit885a5b030ee3717b78bfb82d61e6ee38ef0892ea (patch)
tree83b3684c29d19c915596413505453176b0c9a9c0 /src/sqliteInt.h
parent63f845734e7de67fb04ad1e8990c41850547ce07 (diff)
downloadsqlite-885a5b030ee3717b78bfb82d61e6ee38ef0892ea.tar.gz
sqlite-885a5b030ee3717b78bfb82d61e6ee38ef0892ea.zip
Disable the query flattener for aggregate subqueries if the parent query
uses other subqueries in its result set or WHERE clause or ORDER BY clause. Preliminary fix for ticket [2f7170d73bf9abf8]. However it still contains a defect similar to the COLLATE problem of [ca0d20b6cddd]. FossilOrigin-Name: 0b7d65e3fda676d193347cb782854c28a48252af
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index f5892db4b..e07ee4a5b 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -2046,6 +2046,12 @@ struct Expr {
#define EP_Unlikely 0x040000 /* unlikely() or likelihood() function */
#define EP_ConstFunc 0x080000 /* Node is a SQLITE_FUNC_CONSTANT function */
#define EP_CanBeNull 0x100000 /* Can be null despite NOT NULL constraint */
+#define EP_Subquery 0x200000 /* Tree contains a TK_SELECT operator */
+
+/*
+** Combinations of two or more EP_* flags
+*/
+#define EP_Propagate (EP_Collate|EP_Subquery) /* Propagate these bits up tree */
/*
** These macros can be used to test, set, or clear bits in the
@@ -3153,6 +3159,7 @@ ExprList *sqlite3ExprListAppend(Parse*,ExprList*,Expr*);
void sqlite3ExprListSetName(Parse*,ExprList*,Token*,int);
void sqlite3ExprListSetSpan(Parse*,ExprList*,ExprSpan*);
void sqlite3ExprListDelete(sqlite3*, ExprList*);
+int sqlite3AnyExprListHasProperty(const ExprList*,u32);
int sqlite3Init(sqlite3*, char**);
int sqlite3InitCallback(void*, int, char**, char**);
void sqlite3Pragma(Parse*,Token*,Token*,Token*,int);