1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-12982 JSON_EXTRACT returns data for invalid JSON.

Let's check the validity to the end of the JSON.
This commit is contained in:
Alexey Botchkov
2017-09-12 11:20:30 +04:00
parent 31774f0ede
commit 6352ec2184
3 changed files with 14 additions and 0 deletions

View File

@ -317,3 +317,8 @@ select JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = false;
select JSON_EXTRACT('{\"asdf\":true}', "$.\"asdf\"") = 1;
select JSON_EXTRACT('{\"input1\":\"\\u00f6\"}', '$.\"input1\"');
#
# MDEV-129892 JSON_EXTRACT returns data for invalid JSON
#
select JSON_EXTRACT('{"foo": "bar" foobar foo invalid ', '$.foo');