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

MDEV-11470 JSON_KEYS accepts arguments in invalid format.

Now JSON functions return warnings if arguments are invalid.
This commit is contained in:
Alexey Botchkov
2016-12-13 12:39:48 +04:00
parent 1b7a794b73
commit d26b9f670d
6 changed files with 351 additions and 131 deletions

View File

@ -129,6 +129,7 @@ select json_type('123.12');
select json_keys('{"a":{"c":1, "d":2}, "b":2}');
select json_keys('{"a":{"c":1, "d":2}, "b":2}', "$.a");
select json_keys('{"a":{"c":1, "d":2}, "b":2}', "$.b");
select json_keys('foo');
SET @j = '["abc", [{"k": "10"}, "def"], {"x":"abc"}, {"y":"bcd"}]';
select json_search(@j, 'one', 'abc');