-C Fix\saccess\sviolation\son\sWinCE\splatforms.\s\sTicket\s#3804.\s(CVS\s6509)
-D 2009-04-15T14:36:26
+C Fix\sthe\sgroup_concat()\sfunction\sso\sthat\sit\sinserts\sthe\sseparator\sstring\neven\sif\sthe\sinitial\scontent\sstrings\sare\sempty.\s\sTicket\s#3806.\s(CVS\s6510)
+D 2009-04-15T15:16:53
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/delete.c eb1066b2f35489fee46ad765d2b66386fc7d8adf
F src/expr.c ccc5b5fa3bac249a9ab6e5e10629d77ff293c9f8
F src/fault.c dc88c821842157460750d2d61a8a8b4197d047ff
-F src/func.c 4ebe8c365401f6b4a28bc597a420a9a42e50af61
+F src/func.c ac12ea20d1087b99b8806d380914fd0cbb985c06
F src/global.c 448419c44ce0701104c2121b0e06919b44514c0c
F src/hash.c 5824e6ff7ba78cd34c8d6cd724367713583e5b55
F src/hash.h 28f38ebb1006a5beedcb013bcdfe31befe7437ae
F test/fts3expr.test 9764961c3f4ac818dacda01ed35d8bfcef42338b
F test/fts3expr2.test 8501de895a4c0631e7226c9bac055cd49c9f6646
F test/fts3near.test dc196dd17b4606f440c580d45b3d23aa975fd077
-F test/func.test 70ea3d5b10d40cbc87a19b0819d2842dbcdb31f2
+F test/func.test d4a8590511cdc68a136afd00bd989c2584454932
F test/fuzz.test 8bad3b9b09bad47c50f3433f9598707a70247ce1
F test/fuzz2.test ea38692ce2da99ad79fe0be5eb1a452c1c4d37bb
F test/fuzz3.test aec64345184d1662bd30e6a17851ff659d596dc5
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P c0bba77ae619e709f3fb068526073a4a83cf33b6
-R 60499e56429b76b866740226d762ff74
-U shane
-Z be286a2bb7817f683580514326b970f8
+P e203ad400dd61431b3e6b8219eb5357b6ca06561
+R 08374e872e7a2a83a20b5c0b0a651c1a
+U drh
+Z a006ab98ab05ae9fc2b427cfcf96e911
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
-** $Id: func.c,v 1.232 2009/04/15 13:39:48 drh Exp $
+** $Id: func.c,v 1.233 2009/04/15 15:16:53 drh Exp $
*/
#include "sqliteInt.h"
#include <stdlib.h>
sqlite3 *db = sqlite3_context_db_handle(context);
pAccum->useMalloc = 1;
pAccum->mxAlloc = db->aLimit[SQLITE_LIMIT_LENGTH];
- if( pAccum->nChar ){
+ if( sqlite3_aggregate_count(context)>1 ){
if( argc==2 ){
zSep = (char*)sqlite3_value_text(argv[1]);
nSep = sqlite3_value_bytes(argv[1]);
# This file implements regression tests for SQLite library. The
# focus of this file is testing built-in functions.
#
-# $Id: func.test,v 1.91 2009/02/04 03:59:25 shane Exp $
+# $Id: func.test,v 1.92 2009/04/15 15:16:53 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
} $result
}
+# Ticket #3806. If the initial string in a group_concat is an empty
+# string, the separate that follows should still be present.
+#
+do_test func-24.8 {
+ execsql {
+ SELECT group_concat(CASE t1 WHEN 'this' THEN '' ELSE t1 END) FROM tbl1
+ }
+} {,program,is,free,software}
+do_test func-24.9 {
+ execsql {
+ SELECT group_concat(CASE WHEN t1!='software' THEN '' ELSE t1 END) FROM tbl1
+ }
+} {,,,,software}
+
# Use the test_isolation function to make sure that type conversions
# on function arguments do not effect subsequent arguments.
#