diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2017-12-25 08:10:48 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2017-12-25 08:10:48 +0400 |
commit | f0f3b6549a5924a194e8ce56a0c47443acbb506e (patch) | |
tree | 0c1dc626c77b05a5c58c25a702f56f453905180e /mysql-test | |
parent | 6e7ca6b0b29a732390f2d50902ef7f6db66989ce (diff) | |
download | mariadb-git-f0f3b6549a5924a194e8ce56a0c47443acbb506e.tar.gz |
MDEV-13970 crash in Item_func_json_extract::read_json.
Item_func_json_extract::val_int fixed.
It wasn't tested yet as it's called in exotic cases only.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_json.result | 5 | ||||
-rw-r--r-- | mysql-test/t/func_json.test | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/func_json.result b/mysql-test/r/func_json.result index 55e64ea38e3..b60f6e970e1 100644 --- a/mysql-test/r/func_json.result +++ b/mysql-test/r/func_json.result @@ -731,3 +731,8 @@ Warning 4042 Syntax error in JSON path in argument 3 to function 'json_contains_ select JSON_VALID(0x36f0c8dccd83c5eac156da); JSON_VALID(0x36f0c8dccd83c5eac156da) 0 +create table t1(a double not null); +insert into t1 values (2),(1); +select 1 from t1 where json_extract(a,'$','$[81]'); +1 +drop table t1; diff --git a/mysql-test/t/func_json.test b/mysql-test/t/func_json.test index c6c7c8d3976..0b3cb938098 100644 --- a/mysql-test/t/func_json.test +++ b/mysql-test/t/func_json.test @@ -383,3 +383,12 @@ select json_contains_path('{"foo":"bar"}', 'one', '$[]'); # MDEV-13971 crash in skip_num_constant. # select JSON_VALID(0x36f0c8dccd83c5eac156da); + +# +# MDEV-13970 crash in Item_func_json_extract::read_json. +# +create table t1(a double not null); +insert into t1 values (2),(1); +select 1 from t1 where json_extract(a,'$','$[81]'); +drop table t1; + |