diff options
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_misc.result | 11 | ||||
-rw-r--r-- | mysql-test/suite/vcol/t/vcol_misc.test | 19 |
2 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result index 17b38b7d7af..14467b2d630 100644 --- a/mysql-test/suite/vcol/r/vcol_misc.result +++ b/mysql-test/suite/vcol/r/vcol_misc.result @@ -182,6 +182,17 @@ a b c 2 3 y 0 1 y,n drop table t1,t2; +CREATE TABLE t1 ( +ts TIMESTAMP, +tsv TIMESTAMP AS (ADDDATE(ts, INTERVAL 1 DAY)) VIRTUAL +) ENGINE=MyISAM; +INSERT INTO t1 (tsv) VALUES (DEFAULT); +INSERT DELAYED INTO t1 (tsv) VALUES (DEFAULT); +FLUSH TABLES; +SELECT COUNT(*) FROM t1; +COUNT(*) +2 +DROP TABLE t1; create table t1 (a int, b int); insert into t1 values (3, 30), (4, 20), (1, 20); create table t2 (c int, d int, v int as (d+1), index idx(c)); diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test index 01404046cde..3c51ee4b685 100644 --- a/mysql-test/suite/vcol/t/vcol_misc.test +++ b/mysql-test/suite/vcol/t/vcol_misc.test @@ -179,6 +179,25 @@ select * from t2; drop table t1,t2; # +# Bug mdev-3938: INSERT DELAYED for a table with virtual columns +# + +CREATE TABLE t1 ( + ts TIMESTAMP, + tsv TIMESTAMP AS (ADDDATE(ts, INTERVAL 1 DAY)) VIRTUAL +) ENGINE=MyISAM; + +INSERT INTO t1 (tsv) VALUES (DEFAULT); + +INSERT DELAYED INTO t1 (tsv) VALUES (DEFAULT); + +FLUSH TABLES; + +SELECT COUNT(*) FROM t1; + +DROP TABLE t1; + +# # SELECT that uses a virtual column and executed with BKA # |