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