diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2016-12-03 12:41:19 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2016-12-03 12:41:19 +0400 |
commit | f105014e9b70197a5ae2fed76c3331a873c7116b (patch) | |
tree | 09c43ca0d404127df761a93bb442c9ab5d270324 /mysql-test | |
parent | 7fca133028709a3fbe24af4156edac2d35a0670b (diff) | |
download | mariadb-git-f105014e9b70197a5ae2fed76c3331a873c7116b.tar.gz |
MDEV-11464 Server crashes in mark_object upon JSON_VALID.
Depth of nested objects should be controlled.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_json.result | 3 | ||||
-rw-r--r-- | mysql-test/t/func_json.test | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/mysql-test/r/func_json.result b/mysql-test/r/func_json.result index 5fe88547580..9b9e0623269 100644 --- a/mysql-test/r/func_json.result +++ b/mysql-test/r/func_json.result @@ -13,6 +13,9 @@ json_valid('[false, true, null]') select json_valid(repeat('[', 1000)); json_valid(repeat('[', 1000)) 0 +select json_valid(repeat('{"a":', 1000)); +json_valid(repeat('{"a":', 1000)) +0 select json_value('{"key1":123}', '$.key2'); json_value('{"key1":123}', '$.key2') NULL diff --git a/mysql-test/t/func_json.test b/mysql-test/t/func_json.test index 3d3fdb7fcd8..51ea05cf5f2 100644 --- a/mysql-test/t/func_json.test +++ b/mysql-test/t/func_json.test @@ -3,6 +3,7 @@ select json_valid('"string"}'); select json_valid('{"key1":1, "key2":[2,3]}'); select json_valid('[false, true, null]'); select json_valid(repeat('[', 1000)); +select json_valid(repeat('{"a":', 1000)); select json_value('{"key1":123}', '$.key2'); select json_value('{"key1":123}', '$.key1'); |