1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-13306 JSON_CONTAINS returns wrong value.

The 'value' state should be saved to be compared against the
        next array item.
This commit is contained in:
Alexey Botchkov
2017-10-05 23:23:39 +04:00
parent 08c493c62a
commit 1f6ada8da8
3 changed files with 11 additions and 0 deletions

View File

@ -152,6 +152,9 @@ json_contains('[{"abc":"def", "def":"abc"}]', '["foo","bar"]')
select json_contains('[{"abc":"def", "def":"abc"}, "bar"]', '["bar", {}]');
json_contains('[{"abc":"def", "def":"abc"}, "bar"]', '["bar", {}]')
1
select json_contains('[{"a":"b"},{"c":"d"}]','{"c":"d"}');
json_contains('[{"a":"b"},{"c":"d"}]','{"c":"d"}')
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