1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-11562 Assertion `js->state == JST_VALUE' failed in check_contains(json_engine_t*, json_engine_t*).

check_contains() fixed. When an item of an array is a complex
        structure, it can be half-read after the end of the recursive
        check_contains() call. So we just manually get to it's ending.
This commit is contained in:
Alexey Botchkov
2016-12-16 12:32:56 +04:00
parent 8938031bc7
commit e5377be211
5 changed files with 36 additions and 24 deletions

View File

@ -143,6 +143,12 @@ json_contains('[1, {"a":1}]', '{}')
select json_contains('[1, {"a":1}]', '{"a":1}');
json_contains('[1, {"a":1}]', '{"a":1}')
1
select json_contains('[{"abc":"def", "def":"abc"}]', '["foo","bar"]');
json_contains('[{"abc":"def", "def":"abc"}]', '["foo","bar"]')
0
select json_contains('[{"abc":"def", "def":"abc"}, "bar"]', '["bar", {}]');
json_contains('[{"abc":"def", "def":"abc"}, "bar"]', '["bar", {}]')
1
select json_contains_path('{"key1":1, "key2":[2,3]}', "oNE", "$.key2[1]");
json_contains_path('{"key1":1, "key2":[2,3]}', "oNE", "$.key2[1]")
1