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

Fix the subtype on the value column from json_each/json_tree for cases

when the value is an array or object.  Fix for the bug reported by
[forum:/forumpost/ecb94cd210|forum post ecb94cd210].

FossilOrigin-Name: 1c33c5db2e05019d1a375109f79ad8588a3c17f81e4f4b8d66c880c3c860e87e
This commit is contained in:
drh
2024-02-16 21:30:08 +00:00
parent fd2500f98b
commit 4dd59fd997
4 changed files with 26 additions and 9 deletions

View File

@@ -4944,6 +4944,9 @@ static int jsonEachColumn(
case JEACH_VALUE: {
u32 i = jsonSkipLabel(p);
jsonReturnFromBlob(&p->sParse, i, ctx, 1);
if( (p->sParse.aBlob[i] & 0x0f)>=JSONB_ARRAY ){
sqlite3_result_subtype(ctx, JSON_SUBTYPE);
}
break;
}
case JEACH_TYPE: {