aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-02-16 21:30:08 +0000
committerdrh <>2024-02-16 21:30:08 +0000
commit4dd59fd997fbee21fc83384b3bd3f7635523739d (patch)
tree3a535bd329fe24918e83df18f3436fa8aa31f9ea /src
parentfd2500f98b3c385953a3de83545aa6ddcfcadce0 (diff)
downloadsqlite-4dd59fd997fbee21fc83384b3bd3f7635523739d.tar.gz
sqlite-4dd59fd997fbee21fc83384b3bd3f7635523739d.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/json.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/json.c b/src/json.c
index 3aa4b4e50..c33b63556 100644
--- a/src/json.c
+++ b/src/json.c
@@ -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: {