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 64b657f1146..fc22bc85aee 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -88,6 +88,7 @@ create table t1 (n1 int not null, n2 int, n3 int, n4 float, key (n3, n4, n1, n2), key (n4, n1, n2, n3) ); alter table t1 disable keys; +show keys from t1; #let $1=10000; let $1=10; while ($1) @@ -96,6 +97,7 @@ while ($1) dec $1; } alter table t1 enable keys; +show keys from t1; drop table t1; # @@ -117,3 +119,19 @@ alter table t1 rename t2; alter table t2 rename t1, add c char(10) comment "no comment"; show columns from t1; drop table t1; + +# implicit analyze + +create table t1 (a int, b int); +let $1=100; +while ($1) +{ + eval insert into t1 values(1,$1), (2,$1), (3, $1); + dec $1; +} +alter table t1 add unique (a,b), add key (b); +show keys from t1; +analyze table t1; +show keys from t1; +drop table t1; + |