aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2012-11-10 01:27:59 +0000
committerdrh <drh@noemail.net>2012-11-10 01:27:59 +0000
commitafe5b83dcdee8faffce1b21b8c52a284311ce2a3 (patch)
tree593aa5dec5142730ebd6b0e357f1585308c4fcbd /src/expr.c
parent3dc2b9032fbfaab2c21b8e5755b4c51c7b194ccb (diff)
parentb43081675d225ef7c5dfbab3adfbeb6c9b509ed2 (diff)
downloadsqlite-afe5b83dcdee8faffce1b21b8c52a284311ce2a3.tar.gz
sqlite-afe5b83dcdee8faffce1b21b8c52a284311ce2a3.zip
Merge the latest changes from trunk: chiefly the outer/inner loop query
optimizer scoring enhancement and the INSTR() function. FossilOrigin-Name: 2993ca20207f8dac02f58d01e31d68c84328356a
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/expr.c b/src/expr.c
index 3eee3c6d6..ae828489a 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -4030,8 +4030,10 @@ static int analyzeAggregate(Walker *pWalker, Expr *pExpr){
ExprSetIrreducible(pExpr);
pExpr->iAgg = (i16)i;
pExpr->pAggInfo = pAggInfo;
+ return WRC_Prune;
+ }else{
+ return WRC_Continue;
}
- return WRC_Prune;
}
}
return WRC_Continue;
@@ -4043,9 +4045,10 @@ static int analyzeAggregatesInSelect(Walker *pWalker, Select *pSelect){
}
/*
-** Analyze the given expression looking for aggregate functions and
-** for variables that need to be added to the pParse->aAgg[] array.
-** Make additional entries to the pParse->aAgg[] array as necessary.
+** Analyze the pExpr expression looking for aggregate functions and
+** for variables that need to be added to AggInfo object that pNC->pAggInfo
+** points to. Additional entries are made on the AggInfo object as
+** necessary.
**
** This routine should only be called after the expression has been
** analyzed by sqlite3ResolveExprNames().