MDEV-26506 Over-quoted JSON when combining JSON_ARRAYAGG with JSON_OBJECT
add the test case
This commit is contained in:
parent
cb364a78d6
commit
f6e488cc6d
@ -159,5 +159,23 @@ def j 250 (format=json) 9437283 16 Y 0 39 33
|
||||
j
|
||||
{"a": {"b":"c"}}
|
||||
#
|
||||
# MDEV-26506 Over-quoted JSON when combining JSON_ARRAYAGG with JSON_OBJECT
|
||||
#
|
||||
# maintain JSON property through internal temporary tables
|
||||
create table t1 (a varchar(30));
|
||||
insert into t1 values ('root');
|
||||
select json_object('attr2',o) from (select a, json_arrayagg(json_object('attr1', a)) as o from t1) u;
|
||||
json_object('attr2',o)
|
||||
{"attr2": [{"attr1": "root"}]}
|
||||
drop table t1;
|
||||
create view v1 as select json_object(_latin1 'a', _latin1'b') as v1_json;
|
||||
select v1_json from v1;
|
||||
v1_json
|
||||
{"a": "b"}
|
||||
select json_arrayagg(v1_json) from v1;
|
||||
json_arrayagg(v1_json)
|
||||
[{"a": "b"}]
|
||||
drop view v1;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
@ -121,6 +121,20 @@ SELECT json_object('a', (SELECT json_objectagg(b, c) FROM (SELECT 'b','c') d)) A
|
||||
--disable_ps_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26506 Over-quoted JSON when combining JSON_ARRAYAGG with JSON_OBJECT
|
||||
--echo #
|
||||
--echo # maintain JSON property through internal temporary tables
|
||||
create table t1 (a varchar(30));
|
||||
insert into t1 values ('root');
|
||||
select json_object('attr2',o) from (select a, json_arrayagg(json_object('attr1', a)) as o from t1) u;
|
||||
drop table t1;
|
||||
|
||||
create view v1 as select json_object(_latin1 'a', _latin1'b') as v1_json;
|
||||
select v1_json from v1;
|
||||
select json_arrayagg(v1_json) from v1;
|
||||
drop view v1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
Loading…
x
Reference in New Issue
Block a user