1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-11471 JSON_ARRAY_APPEND returns incorrect results.

Item_func_json_array_append::val_str fixed.
This commit is contained in:
Alexey Botchkov
2016-12-05 08:43:15 +04:00
parent abb80d25f4
commit fe6d0a0719
3 changed files with 93 additions and 28 deletions

View File

@ -55,6 +55,9 @@ 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_append('["a", ["b", "c"], "d"]', '$[0]', 2);
json_array_append('["a", ["b", "c"], "d"]', '$[0]', 2)
[["a", 2], ["b", "c"], "d"]
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]]