mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Fix problems in the "json" output column of the json_tree() virtual table
for the case when the input is JSONB. FossilOrigin-Name: fefa4475c496aab32fe7b9cc203747ce4faf7448da4f29b807e5486c7686238d
This commit is contained in:
@@ -3514,7 +3514,6 @@ static int jsonParseValueFromBlob(JsonParse *pParse, u32 i){
|
||||
break;
|
||||
}
|
||||
}
|
||||
pParse->aBlob[i] = 0;
|
||||
return i+x+sz;
|
||||
}
|
||||
|
||||
@@ -5356,8 +5355,12 @@ static int jsonEachColumn(
|
||||
break;
|
||||
}
|
||||
case JEACH_JSON: {
|
||||
assert( i==JEACH_JSON );
|
||||
sqlite3_result_text(ctx, p->sParse.zJson, -1, SQLITE_STATIC);
|
||||
if( p->sParse.isBinary ){
|
||||
sqlite3_result_blob(ctx, p->sParse.aBlob, p->sParse.nBlob,
|
||||
SQLITE_STATIC);
|
||||
}else{
|
||||
sqlite3_result_text(ctx, p->sParse.zJson, -1, SQLITE_STATIC);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user