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

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
parent 1f6ada8da8
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