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:
@ -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
|
||||
|
Reference in New Issue
Block a user