diff options
Diffstat (limited to 'mysql-test/t/alter_table.test')
-rw-r--r-- | mysql-test/t/alter_table.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 79a01d5e0c4..63d24c0740d 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -1883,5 +1883,23 @@ show create table t1; drop table t1; --echo # +--echo # MDEV-13508 Check that rename of columns changes defaults, virtual +--echo # columns and constraints +--echo # + +create table t1 (a int, b int, check(a>b)); +alter table t1 change column a b int, change column b a int; +show create table t1; +drop table t1; + +create table t1 (a int primary key, b int, c int default (a+b) check (a+b>0), + d int as (a+b), + key (b), + constraint test check (a+b > 1)); +alter table t1 change b new_b int not null, add column b char(1), add constraint new check (length(b) > 0); +show create table t1; +drop table t1; + +--echo # --echo # End of 10.2 tests --echo # |