diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/myisam.result | 24 | ||||
-rw-r--r-- | mysql-test/t/help.test | 4 | ||||
-rw-r--r-- | mysql-test/t/myisam.test | 24 |
3 files changed, 50 insertions, 2 deletions
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index d210048a5c7..340db24cb44 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -504,3 +504,27 @@ test.t1 968604391 test.t2 968604391 test.t3 NULL drop table t1,t2; +create table t1 (a int, key (a)); +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a A NULL NULL NULL YES BTREE +alter table t1 disable keys; +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a A NULL NULL NULL YES BTREE disabled +create table t2 (a int); +insert t1 select * from t2; +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a A NULL NULL NULL YES BTREE disabled +alter table t1 enable keys; +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a A 1000 NULL NULL YES BTREE +alter table t1 engine=heap; +alter table t1 disable keys; +ERROR HY000: Table storage engine for 't1' doesn't have this option +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a NULL NULL NULL NULL YES HASH +drop table t1,t2; diff --git a/mysql-test/t/help.test b/mysql-test/t/help.test index 54c551ccd7a..3f3e99e1556 100644 --- a/mysql-test/t/help.test +++ b/mysql-test/t/help.test @@ -1,5 +1,3 @@ --- source include/have_innodb.inc - # category: topic: keyword: # # impossible_category_1 @@ -65,10 +63,12 @@ help 'impossible_function_1'; help 'impossible_category_1'; ############## +--disable_warnings alter table mysql.help_relation engine=innodb; alter table mysql.help_keyword engine=innodb; alter table mysql.help_topic engine=innodb; alter table mysql.help_category engine=innodb; +--enable_warnings ############## help 'function_of_my_dream'; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 95847ba1af7..ea5895b8ea1 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -479,3 +479,27 @@ checksum table t1, t2, t3; checksum table t1, t2, t3 extended; #show table status; drop table t1,t2; + +create table t1 (a int, key (a)); +show keys from t1; +alter table t1 disable keys; +show keys from t1; +create table t2 (a int); +let $i=1000; +--disable_query_log +while ($i) +{ + dec $i; + eval insert t2 values (rand()*100000); +} +--enable_query_log +insert t1 select * from t2; +show keys from t1; +alter table t1 enable keys; +show keys from t1; +alter table t1 engine=heap; +--error 1031 +alter table t1 disable keys; +show keys from t1; +drop table t1,t2; + |