aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
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/select.c
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/select.c')
-rw-r--r--src/select.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/select.c b/src/select.c
index 491356acb..a4bb2d496 100644
--- a/src/select.c
+++ b/src/select.c
@@ -3149,7 +3149,7 @@ static Table *isSimpleCount(Select *p, AggInfo *pAggInfo){
if( IsVirtual(pTab) ) return 0;
if( pExpr->op!=TK_AGG_FUNCTION ) return 0;
- if( pAggInfo->nFunc==0 ) return 0;
+ if( NEVER(pAggInfo->nFunc==0) ) return 0;
if( (pAggInfo->aFunc[0].pFunc->flags&SQLITE_FUNC_COUNT)==0 ) return 0;
if( pExpr->flags&EP_Distinct ) return 0;
@@ -3521,7 +3521,7 @@ static void sqlite3SelectAddTypeInfo(Parse *pParse, Select *pSelect){
/*
-** This routine sets of a SELECT statement for processing. The
+** This routine sets up a SELECT statement for processing. The
** following is accomplished:
**
** * VDBE Cursor numbers are assigned to all FROM-clause terms.
@@ -3553,7 +3553,8 @@ void sqlite3SelectPrep(
**
** The aggregate accumulator is a set of memory cells that hold
** intermediate results while calculating an aggregate. This
-** routine simply stores NULLs in all of those memory cells.
+** routine generates code that stores NULLs in all of those memory
+** cells.
*/
static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){
Vdbe *v = pParse->pVdbe;