mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-15 11:41:13 +03:00
If SSE is enabled, set the P1 field of OP_AggInit instructions to the
number of arguments that will be passed to the aggregate function. (CVS 2484) FossilOrigin-Name: 7f67b9f0f398583651d226fabf2fafd2635d772a
This commit is contained in:
11
src/select.c
11
src/select.c
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle SELECT statements in SQLite.
|
||||
**
|
||||
** $Id: select.c,v 1.247 2005/05/19 08:43:00 danielk1977 Exp $
|
||||
** $Id: select.c,v 1.248 2005/05/26 14:41:47 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -2735,7 +2735,14 @@ int sqlite3Select(
|
||||
for(i=0; i<pParse->nAgg; i++){
|
||||
FuncDef *pFunc;
|
||||
if( (pFunc = pParse->aAgg[i].pFunc)!=0 && pFunc->xFinalize!=0 ){
|
||||
sqlite3VdbeOp3(v, OP_AggInit, 0, i, (char*)pFunc, P3_FUNCDEF);
|
||||
int nExpr = 0;
|
||||
#ifdef SQLITE_SSE
|
||||
Expr *pAggExpr = pParse->aAgg[i].pExpr;
|
||||
if( pAggExpr && pAggExpr->pList ){
|
||||
nExpr = pAggExpr->pList->nExpr;
|
||||
}
|
||||
#endif
|
||||
sqlite3VdbeOp3(v, OP_AggInit, nExpr, i, (char*)pFunc, P3_FUNCDEF);
|
||||
}
|
||||
}
|
||||
if( pGroupBy ){
|
||||
|
||||
Reference in New Issue
Block a user