mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Fix the concat_ws() SQL function so that it includes empty strings in the
concatenation. [forum:/forumpost/52503ac21d|Forum post 52503ac21d]. FossilOrigin-Name: 80a78987da484d435a8242c05c48d546d430920df713b24a9d9d9fff7ba1113d
This commit is contained in:
@@ -1667,7 +1667,7 @@ static void concatFuncCore(
|
||||
int nSep,
|
||||
const char *zSep
|
||||
){
|
||||
i64 j, k, n = 0;
|
||||
i64 j, n = 0;
|
||||
int i;
|
||||
char *z;
|
||||
for(i=0; i<argc; i++){
|
||||
@@ -1681,8 +1681,8 @@ static void concatFuncCore(
|
||||
}
|
||||
j = 0;
|
||||
for(i=0; i<argc; i++){
|
||||
k = sqlite3_value_bytes(argv[i]);
|
||||
if( k>0 ){
|
||||
if( sqlite3_value_type(argv[i])!=SQLITE_NULL ){
|
||||
int k = sqlite3_value_bytes(argv[i]);
|
||||
const char *v = (const char*)sqlite3_value_text(argv[i]);
|
||||
if( v!=0 ){
|
||||
if( j>0 && nSep>0 ){
|
||||
|
Reference in New Issue
Block a user