summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2016-12-03 12:41:19 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2016-12-03 12:41:19 +0400
commitf105014e9b70197a5ae2fed76c3331a873c7116b (patch)
tree09c43ca0d404127df761a93bb442c9ab5d270324 /mysql-test
parent7fca133028709a3fbe24af4156edac2d35a0670b (diff)
downloadmariadb-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.result3
-rw-r--r--mysql-test/t/func_json.test1
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');