aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-05-07 17:19:31 +0000
committerdrh <drh@noemail.net>2014-05-07 17:19:31 +0000
commiteacc050f3059b197533fc2d4903cb1fb8108ec7d (patch)
tree71b50266fc332c873219c7ec833f6154e2ebccbb /src
parent731dc0cb0eb13744b0c8d13b443255f0c55296b6 (diff)
downloadsqlite-eacc050f3059b197533fc2d4903cb1fb8108ec7d.tar.gz
sqlite-eacc050f3059b197533fc2d4903cb1fb8108ec7d.zip
Make sure the group_concat() function returns an empty string, not a NULL,
if it has at least one input row. Fix for ticket [55746f9e65f8587]. FossilOrigin-Name: 0deac8737545a020d344be96fff16660a7977ab8
Diffstat (limited to 'src')
-rw-r--r--src/func.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/func.c b/src/func.c
index 6be963580..50f76c33d 100644
--- a/src/func.c
+++ b/src/func.c
@@ -1541,7 +1541,7 @@ static void groupConcatStep(
}
zVal = (char*)sqlite3_value_text(argv[0]);
nVal = sqlite3_value_bytes(argv[0]);
- if( nVal ) sqlite3StrAccumAppend(pAccum, zVal, nVal);
+ if( nVal || firstTerm ) sqlite3StrAccumAppend(pAccum, zVal, nVal);
}
}
static void groupConcatFinalize(sqlite3_context *context){