1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-21 11:13:54 +03:00

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
This commit is contained in:
drh
2014-05-07 17:19:31 +00:00
parent 731dc0cb0e
commit eacc050f30
4 changed files with 21 additions and 10 deletions

View File

@@ -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){