mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-21 11:13:54 +03:00
Fix the group_concat() inverse function implementation so that it correctly
handles BLOB inputs when database text encoding is UTF16. FossilOrigin-Name: 38a1326b4bd11bbe2846990d099c28520d17ab4cace1af67248c2472f89df929
This commit is contained in:
@@ -1820,7 +1820,11 @@ static void groupConcatInverse(
|
||||
/* pGCC is always non-NULL since groupConcatStep() will have always
|
||||
** run frist to initialize it */
|
||||
if( ALWAYS(pGCC) ){
|
||||
int nVS = sqlite3_value_bytes(argv[0]);
|
||||
int nVS;
|
||||
/* Must call sqlite3_value_text() to convert the argument into text prior
|
||||
** to invoking sqlite3_value_bytes(), in case the text encoding is UTF16 */
|
||||
(void)sqlite3_value_text(argv[0]);
|
||||
nVS = sqlite3_value_bytes(argv[0]);
|
||||
pGCC->nAccum -= 1;
|
||||
if( pGCC->pnSepLengths!=0 ){
|
||||
assert(pGCC->nAccum >= 0);
|
||||
|
Reference in New Issue
Block a user