aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2012-08-24 01:07:52 +0000
committerdrh <drh@noemail.net>2012-08-24 01:07:52 +0000
commitfb0a60819b7dda9646b1a7e02bc50ee2784fbe74 (patch)
tree5af4d550e6309f961c3be09075509d1ed74ca4bb /src/sqliteInt.h
parent319a17071752651dfc41435f5cabcebe4e71172a (diff)
parented551b95a4a0f71be84820b31d4c865eea294407 (diff)
downloadsqlite-fb0a60819b7dda9646b1a7e02bc50ee2784fbe74.tar.gz
sqlite-fb0a60819b7dda9646b1a7e02bc50ee2784fbe74.zip
Merge the nested aggregate query enhancements into trunk.
FossilOrigin-Name: d4cd6017c9875947a05b1dc36538d4272fb18739
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index b3cdb2363..443eaa403 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -1690,8 +1690,9 @@ struct Expr {
i16 iAgg; /* Which entry in pAggInfo->aCol[] or ->aFunc[] */
i16 iRightJoinTable; /* If EP_FromJoin, the right table of the join */
u8 flags2; /* Second set of flags. EP2_... */
- u8 op2; /* If a TK_REGISTER, the original value of Expr.op */
- /* If TK_COLUMN, the value of p5 for OP_Column */
+ u8 op2; /* TK_REGISTER: original value of Expr.op
+ ** TK_COLUMN: the value of p5 for OP_Column
+ ** TK_AGG_FUNCTION: nesting depth */
AggInfo *pAggInfo; /* Used by TK_AGG_COLUMN and TK_AGG_FUNCTION */
Table *pTab; /* Table for TK_COLUMN expressions. */
#if SQLITE_MAX_EXPR_DEPTH>0
@@ -2498,10 +2499,12 @@ struct Walker {
int (*xExprCallback)(Walker*, Expr*); /* Callback for expressions */
int (*xSelectCallback)(Walker*,Select*); /* Callback for SELECTs */
Parse *pParse; /* Parser context. */
+ int walkerDepth; /* Number of subqueries */
union { /* Extra data for callback */
NameContext *pNC; /* Naming context */
int i; /* Integer value */
SrcList *pSrcList; /* FROM clause */
+ struct SrcCount *pSrcCount; /* Counting column references */
} u;
};
@@ -2835,6 +2838,7 @@ int sqlite3ExprCompare(Expr*, Expr*);
int sqlite3ExprListCompare(ExprList*, ExprList*);
void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*);
void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*);
+int sqlite3FunctionUsesThisSrc(Expr*, SrcList*);
Vdbe *sqlite3GetVdbe(Parse*);
void sqlite3PrngSaveState(void);
void sqlite3PrngRestoreState(void);