diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-01-29 15:41:05 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-01-29 15:41:05 +0100 |
commit | 41a163ac5ccf4ac5394edc84e40b3f47acea6b08 (patch) | |
tree | 60d5259e290b4a0166d8ef1651975b14b5afe304 /mysql-test/main/func_json.result | |
parent | a85d942be9008cf19086d8bd330c4be83a18167f (diff) | |
parent | e2b50213cf12623da31c8b49be4d40772876223c (diff) | |
download | mariadb-git-41a163ac5ccf4ac5394edc84e40b3f47acea6b08.tar.gz |
Merge branch '10.2' into 10.3mariadb-10.3.33
Diffstat (limited to 'mysql-test/main/func_json.result')
-rw-r--r-- | mysql-test/main/func_json.result | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result index 6656e0d5e51..cba57b0853e 100644 --- a/mysql-test/main/func_json.result +++ b/mysql-test/main/func_json.result @@ -940,6 +940,24 @@ SELECT JSON_REPLACE( JSON_DETAILED('["x"]'), '$.a', 'xx' ); JSON_REPLACE( JSON_DETAILED('["x"]'), '$.a', 'xx' ) ["x"] # +# MDEV-18284 JSON casting using JSON_COMPACT doesn't always work +# with values from subqueries +# +CREATE TABLE json_test(a JSON, b JSON); +INSERT INTO json_test VALUES ("[1,2,3]", '{"a":"foo"}'); +SELECT * FROM json_test; +a b +[1,2,3] {"a":"foo"} +SELECT json_object("a", json_compact(a), "b", b) +FROM (SELECT * FROM json_test) AS json_test_values; +json_object("a", json_compact(a), "b", b) +{"a": [1,2,3], "b": "{\"a\":\"foo\"}"} +SELECT json_object("a", json_compact(a), "b", json_compact(b)) +FROM (SELECT * FROM json_test) AS json_test_values; +json_object("a", json_compact(a), "b", json_compact(b)) +{"a": [1,2,3], "b": {"a":"foo"}} +DROP TABLE json_test; +# # End of 10.2 tests # # |