summaryrefslogtreecommitdiff
path: root/mysql-test/suite/vcol
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-08-25 10:25:48 +0200
committerSergei Golubchik <serg@mariadb.org>2017-08-25 10:25:48 +0200
commit27412877dbcf601676f4515a99b2abee1f19623b (patch)
tree2cb1a2e1a58ba10f2a96fcdec43f5ed77c326fd0 /mysql-test/suite/vcol
parentf2033df6ac0f64664d9aad2d56fdd74f4bf9d666 (diff)
parenta544225d0a772bd4b67c96f5861ecc0ef7e69bba (diff)
downloadmariadb-git-27412877dbcf601676f4515a99b2abee1f19623b.tar.gz
Merge branch '10.2' into bb-10.2-ext
Diffstat (limited to 'mysql-test/suite/vcol')
-rw-r--r--mysql-test/suite/vcol/r/wrong_arena.result9
-rw-r--r--mysql-test/suite/vcol/t/wrong_arena.test11
2 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/suite/vcol/r/wrong_arena.result b/mysql-test/suite/vcol/r/wrong_arena.result
index e86026852e4..c105a069b7f 100644
--- a/mysql-test/suite/vcol/r/wrong_arena.result
+++ b/mysql-test/suite/vcol/r/wrong_arena.result
@@ -59,3 +59,12 @@ a b
Warnings:
Warning 1292 Incorrect datetime value: '1'
drop table t1;
+create table t1 (
+id int not null ,
+js varchar(1000) not null,
+t time AS (cast(json_value(json_extract(js,concat('$.singleDay."', dayname(curdate()),'"')),'$.start') as time)) virtual);
+insert into t1(id,js) values (0, '{"default" : {"start": "00:00:00", "end":"23:59:50"}}');
+select * from t1;
+id js t
+0 {"default" : {"start": "00:00:00", "end":"23:59:50"}} NULL
+drop table t1;
diff --git a/mysql-test/suite/vcol/t/wrong_arena.test b/mysql-test/suite/vcol/t/wrong_arena.test
index 340634422ae..3d65dac9219 100644
--- a/mysql-test/suite/vcol/t/wrong_arena.test
+++ b/mysql-test/suite/vcol/t/wrong_arena.test
@@ -37,3 +37,14 @@ disconnect con1;
connection default;
select * from t1;
drop table t1;
+
+#
+# MDEV-13435 Crash when selecting virtual columns generated using JSON functions
+#
+create table t1 (
+ id int not null ,
+ js varchar(1000) not null,
+ t time AS (cast(json_value(json_extract(js,concat('$.singleDay."', dayname(curdate()),'"')),'$.start') as time)) virtual);
+insert into t1(id,js) values (0, '{"default" : {"start": "00:00:00", "end":"23:59:50"}}');
+select * from t1;
+drop table t1;