From c62705434021f8ed7b7cfdf9dbba5b1751ebd6f2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 6 Apr 2004 21:35:26 +0200 Subject: ::reset(), HA_FAST_KEY_READ, disable_indexes(), enable_indexes(), start_bulk_insert(), end_bulk_insert() Field::val_str simplification, comment include/my_base.h: typos fixed mysql-test/r/myisam.result: alter table enable/disable keys mysql-test/t/help.test: cleanup mysql-test/t/myisam.test: alter table enable/disable keys sql/field.cc: Field::val_str() simplification sql/field.h: Field::val_str() simplification and comment sql/field_conv.cc: Field::val_str() simplification sql/ha_berkeley.cc: ::reset(), HA_FAST_KEY_READ sql/ha_berkeley.h: ::reset(), HA_FAST_KEY_READ sql/ha_heap.cc: ::reset(), HA_FAST_KEY_READ sql/ha_heap.h: ::reset(), HA_FAST_KEY_READ sql/ha_innodb.cc: ::reset(), HA_FAST_KEY_READ sql/ha_innodb.h: ::reset(), HA_FAST_KEY_READ sql/ha_isam.cc: ::reset(), HA_FAST_KEY_READ sql/ha_isam.h: ::reset(), HA_FAST_KEY_READ sql/ha_isammrg.cc: ::reset(), HA_FAST_KEY_READ sql/ha_isammrg.h: ::reset(), HA_FAST_KEY_READ sql/ha_myisam.cc: ::reset(), HA_FAST_KEY_READ, disable_indexes(), enable_indexes(), start_bulk_insert(), end_bulk_insert() sql/ha_myisam.h: ::reset(), HA_FAST_KEY_READ, disable_indexes(), enable_indexes(), start_bulk_insert(), end_bulk_insert() sql/ha_myisammrg.cc: ::reset(), HA_FAST_KEY_READ sql/ha_myisammrg.h: ::reset(), HA_FAST_KEY_READ sql/handler.h: ::reset(), HA_FAST_KEY_READ, disable_indexes(), enable_indexes(), start_bulk_insert(), end_bulk_insert() sql/item.cc: Field::val_str() simplification sql/item_sum.cc: Field::val_str() simplification sql/key.cc: Field::val_str() simplification sql/opt_range.cc: Field::val_str() simplification sql/protocol.cc: Field::val_str() simplification sql/records.cc: HA_FAST_KEY_READ sql/sql_acl.cc: Field::val_str() simplification sql/sql_base.cc: ::reset sql/sql_insert.cc: ::reset(), start_bulk_insert(), end_bulk_insert() sql/sql_load.cc: start_bulk_insert(), end_bulk_insert() sql/sql_show.cc: Field::val_str() simplification sql/sql_table.cc: disable_indexes(), enable_indexes(), start_bulk_insert(), end_bulk_insert() sql/table.cc: Field::val_str() simplification --- mysql-test/r/myisam.result | 24 ++++++++++++++++++++++++ mysql-test/t/help.test | 4 ++-- mysql-test/t/myisam.test | 24 ++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) (limited to 'mysql-test') 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; + -- cgit v1.2.1