diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2014-06-03 16:57:29 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2014-06-03 16:57:29 +0400 |
commit | 23a5b2eb6d3ebb2536186c4bd324c39cb2768450 (patch) | |
tree | 5f567c8b5e0bf4848ff687da966118c077ad3b9e /mysql-test | |
parent | b6b5b748e7fcdd370caa95429cbcaf6bb4108c72 (diff) | |
download | mariadb-git-23a5b2eb6d3ebb2536186c4bd324c39cb2768450.tar.gz |
MDEV-6103 - Adding/removing non-materialized virtual column triggers
table recreation
Relaxed InnoDB/XtraDB checks to allow online add/drop of
non-materialized virtual columns.
Diffstat (limited to 'mysql-test')
3 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/suite/vcol/inc/vcol_non_stored_columns.inc b/mysql-test/suite/vcol/inc/vcol_non_stored_columns.inc index c586479618a..8c83586109c 100644 --- a/mysql-test/suite/vcol/inc/vcol_non_stored_columns.inc +++ b/mysql-test/suite/vcol/inc/vcol_non_stored_columns.inc @@ -160,3 +160,15 @@ select * from t1; show create table t1; drop table t1; +--echo # +--echo # MDEV-6103 - Adding/removing non-materialized virtual column triggers +--echo # table recreation +--echo # +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(1),(1),(1),(1),(1),(1),(1),(1),(1),(1); +enable_info; +ALTER TABLE t1 ADD COLUMN b INT AS (a + 1) VIRTUAL; +ALTER TABLE t1 DROP COLUMN b; +disable_info; +CHECK TABLE t1; +DROP TABLE t1; diff --git a/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result b/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result index 0379a71922d..85e89f57090 100644 --- a/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result @@ -240,3 +240,19 @@ t1 CREATE TABLE `t1` ( `c` int(11) AS (week(b,1)) VIRTUAL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t1; +# +# MDEV-6103 - Adding/removing non-materialized virtual column triggers +# table recreation +# +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(1),(1),(1),(1),(1),(1),(1),(1),(1),(1); +ALTER TABLE t1 ADD COLUMN b INT AS (a + 1) VIRTUAL; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 DROP COLUMN b; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result b/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result index de9a962ac2c..d73ea923a11 100644 --- a/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result @@ -240,3 +240,19 @@ t1 CREATE TABLE `t1` ( `c` int(11) AS (week(b,1)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +# +# MDEV-6103 - Adding/removing non-materialized virtual column triggers +# table recreation +# +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(1),(1),(1),(1),(1),(1),(1),(1),(1),(1); +ALTER TABLE t1 ADD COLUMN b INT AS (a + 1) VIRTUAL; +affected rows: 10 +info: Records: 10 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 DROP COLUMN b; +affected rows: 10 +info: Records: 10 Duplicates: 0 Warnings: 0 +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; |