aboutsummaryrefslogtreecommitdiff
path: root/src/func.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/func.c')
-rw-r--r--src/func.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/func.c b/src/func.c
index c48896d4e..6243536cb 100644
--- a/src/func.c
+++ b/src/func.c
@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
-** $Id: func.c,v 1.238 2009/06/19 14:06:03 drh Exp $
+** $Id: func.c,v 1.239 2009/06/19 16:44:41 drh Exp $
*/
#include "sqliteInt.h"
#include <stdlib.h>
@@ -1265,15 +1265,10 @@ static void groupConcatStep(
if( pAccum ){
sqlite3 *db = sqlite3_context_db_handle(context);
- int n;
+ int firstTerm = pAccum->useMalloc==0;
pAccum->useMalloc = 1;
pAccum->mxAlloc = db->aLimit[SQLITE_LIMIT_LENGTH];
-#ifdef SQLITE_OMIT_DEPRECATED
- n = context->pMem->n;
-#else
- n = sqlite3_aggregate_count(context);
-#endif
- if( n>1 ){
+ if( !firstTerm ){
if( argc==2 ){
zSep = (char*)sqlite3_value_text(argv[1]);
nSep = sqlite3_value_bytes(argv[1]);