summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_json.result
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2017-02-10 01:05:27 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2017-02-10 01:05:27 +0400
commit25aaecb240d20547791cbbc06f1ccb3630782cd5 (patch)
tree453067cc842f869491e2fa77a5e7524017448fc7 /mysql-test/r/func_json.result
parent3ae038b732ce503fb839e9095355e05f5c6866f9 (diff)
downloadmariadb-git-25aaecb240d20547791cbbc06f1ccb3630782cd5.tar.gz
MDEV-11858 json_merge() concatenates instead of merging.
Fix json_merge implementation.
Diffstat (limited to 'mysql-test/r/func_json.result')
-rw-r--r--mysql-test/r/func_json.result12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/func_json.result b/mysql-test/r/func_json.result
index e72da47e4ae..bdee7cb9f7f 100644
--- a/mysql-test/r/func_json.result
+++ b/mysql-test/r/func_json.result
@@ -555,3 +555,15 @@ json_set('[]', '$[0][0][0]', 100)
SELECT JSON_search( '{"": "a"}', "one", 'a');
JSON_search( '{"": "a"}', "one", 'a')
"$."
+select json_merge('{"a":"b"}', '{"a":"c"}') ;
+json_merge('{"a":"b"}', '{"a":"c"}')
+{"a": ["b", "c"]}
+select json_merge('{"a":{"x":"b"}}', '{"a":"c"}') ;
+json_merge('{"a":{"x":"b"}}', '{"a":"c"}')
+{"a": [{"x": "b"}, "c"]}
+select json_merge('{"a":{"u":12, "x":"b"}}', '{"a":{"x":"c"}}') ;
+json_merge('{"a":{"u":12, "x":"b"}}', '{"a":{"x":"c"}}')
+{"a": {"u": 12, "x": ["b", "c"]}}
+select json_merge('{"a":{"u":12, "x":"b", "r":1}}', '{"a":{"x":"c", "r":2}}') ;
+json_merge('{"a":{"u":12, "x":"b", "r":1}}', '{"a":{"x":"c", "r":2}}')
+{"a": {"u": 12, "x": ["b", "c"], "r": [1, 2]}}