mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-11472 JSON_ARRAY_INSERT returns incorrect results.
Item_func_json_array_insert::val_str fixed.
This commit is contained in:
@ -22,10 +22,11 @@ select json_array(1, "text", false, null);
|
||||
select json_array_append('["a", "b"]', '$', FALSE);
|
||||
select json_array_append('{"k1":1, "k2":["a", "b"]}', '$.k2', 2);
|
||||
|
||||
SELECT JSON_ARRAY_INSERT('["a", {"b": [1, 2]}, [3, 4]]', '$[1]', 'x');
|
||||
SELECT JSON_ARRAY_INSERT('["a", {"b": [1, 2]}, [3, 4]]', '$[2]', 'x');
|
||||
SELECT JSON_ARRAY_INSERT('["a", {"b": [1, 2]}, [3, 4]]', '$[3]', 'x');
|
||||
SELECT JSON_ARRAY_INSERT('["a", {"b": [1, 2]}, [3, 4]]', '$[4]', 'x');
|
||||
select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[1]', 'x');
|
||||
select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[2]', 'x');
|
||||
select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[3]', 'x');
|
||||
select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[4]', 'x');
|
||||
select json_array_insert('["a", {"b": [1, 2]}, [3, 4]]', '$[1].b[0]', 'x');
|
||||
|
||||
select json_contains('{"k1":123, "k2":345}', '123', '$.k1');
|
||||
select json_contains('"you"', '"you"');
|
||||
|
Reference in New Issue
Block a user