diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2016-12-05 08:03:11 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2016-12-05 08:03:11 +0400 |
commit | abb80d25f40a143877dbe98c1fb9f95b8fe43f4f (patch) | |
tree | 9854ef8ed16daa812ad5bf921f441b120c38b586 /mysql-test/r | |
parent | df87dce03c22f989d813ea88aca2699e1f88c456 (diff) | |
download | mariadb-git-abb80d25f40a143877dbe98c1fb9f95b8fe43f4f.tar.gz |
MDEV-11472 JSON_ARRAY_INSERT returns incorrect results.
Item_func_json_array_insert::val_str fixed.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/func_json.result | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/mysql-test/r/func_json.result b/mysql-test/r/func_json.result index 6ef294400d3..6d0e02b7d16 100644 --- a/mysql-test/r/func_json.result +++ b/mysql-test/r/func_json.result @@ -55,18 +55,21 @@ json_array_append('["a", "b"]', '$', FALSE) select json_array_append('{"k1":1, "k2":["a", "b"]}', '$.k2', 2); json_array_append('{"k1":1, "k2":["a", "b"]}', '$.k2', 2) {"k1":1, "k2":["a", "b", 2]} -SELECT JSON_ARRAY_INSERT('["a", {"b": [1, 2]}, [3, 4]]', '$[1]', 'x'); -JSON_ARRAY_INSERT('["a", {"b": [1, 2]}, [3, 4]]', '$[1]', 'x') +select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[1]', 'x'); +json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[1]', 'x') ["a", "x", {"b": [1, 2]}, [3, 4]] -SELECT JSON_ARRAY_INSERT('["a", {"b": [1, 2]}, [3, 4]]', '$[2]', 'x'); -JSON_ARRAY_INSERT('["a", {"b": [1, 2]}, [3, 4]]', '$[2]', 'x') +select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[2]', 'x'); +json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[2]', 'x') ["a", {"b": [1, 2]}, "x", [3, 4]] -SELECT JSON_ARRAY_INSERT('["a", {"b": [1, 2]}, [3, 4]]', '$[3]', 'x'); -JSON_ARRAY_INSERT('["a", {"b": [1, 2]}, [3, 4]]', '$[3]', 'x') +select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[3]', 'x'); +json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[3]', 'x') ["a", {"b": [1, 2]}, [3, 4], "x"] -SELECT JSON_ARRAY_INSERT('["a", {"b": [1, 2]}, [3, 4]]', '$[4]', 'x'); -JSON_ARRAY_INSERT('["a", {"b": [1, 2]}, [3, 4]]', '$[4]', 'x') +select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[4]', 'x'); +json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[4]', 'x') ["a", {"b": [1, 2]}, [3, 4], "x"] +select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[1].b[0]', 'x'); +json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[1].b[0]', 'x') +["a", {"b": [ "x",1, 2]}, [3, 4]] select json_contains('{"k1":123, "k2":345}', '123', '$.k1'); json_contains('{"k1":123, "k2":345}', '123', '$.k1') 1 |