1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-11571 JSON_EXTRACT returns wrong results.

Array counter didn't increment after an item was found.
This commit is contained in:
Alexey Botchkov
2016-12-24 10:51:43 +04:00
parent bbb3fb318e
commit 4d10273b4f
3 changed files with 5 additions and 4 deletions

View File

@@ -77,6 +77,7 @@ select json_extract(json_object('foo', 'foobar'),'$');
select json_extract('[10, 20, [30, 40]]', '$[2][*]');
select json_extract('[10, 20, [{"a":3}, 30, 40]]', '$[2][*]');
select json_extract('1', '$');
select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]');
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.k1', 'word');
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.d[3]', 3);