MDEV-12311 Insufficient check for argument validity in JSON functions.

Check validity to the end of the JSON in the json_length
        function.
This commit is contained in:
Alexey Botchkov 2017-10-05 23:46:25 +04:00
commit f1a20ec396
3 changed files with 14 additions and 1 deletions

View file

@ -446,6 +446,11 @@ json_length('{"a": 1, "b": {"c": 30}}', '$.b')
select json_length('{"a": 1, "b": {"c": 30}}');
json_length('{"a": 1, "b": {"c": 30}}')
2
select json_length('{}{');
json_length('{}{')
NULL
Warnings:
Warning 4038 Syntax error in JSON text in argument 1 to function 'json_length' at position 3
create table json (j INT);
show create table json;
Table Create Table