summaryrefslogtreecommitdiff
path: root/mysql-test/r/alter_table.result
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-07-08 23:58:04 +0300
committerunknown <monty@mashka.mysql.fi>2003-07-08 23:58:04 +0300
commite13e857cae1ecaa322a0b4dec76e5b5dfb4f53a0 (patch)
tree469e4c68e8c5de015364504f40b14cec7177b355 /mysql-test/r/alter_table.result
parent4c2d3b05547e137cf80f7b983d33927c6072799b (diff)
downloadmariadb-git-e13e857cae1ecaa322a0b4dec76e5b5dfb4f53a0.tar.gz
Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
Removed double my_thread_end() which caused fatal error on windows if mysqld died on startup myisam/mi_extra.c: Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS mysql-test/r/alter_table.result: Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS mysql-test/t/alter_table.test: Test DISABLE/ENABLE KEY sql/ha_myisam.cc: Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS sql/mysqld.cc: Removed double my_thread_end() which caused fatal error on windows if mysqld died on startup sql/sql_table.cc: Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS sql/table.cc: Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS sql/table.h: Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
Diffstat (limited to 'mysql-test/r/alter_table.result')
-rw-r--r--mysql-test/r/alter_table.result69
1 files changed, 69 insertions, 0 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index e2d9cc30ad9..7ade3313abe 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -281,3 +281,72 @@ ALTER TABLE t1 DISABLE KEYS;
INSERT DELAYED INTO t1 VALUES(1),(2),(3);
ALTER TABLE t1 ENABLE KEYS;
drop table t1;
+CREATE TABLE t1 (
+Host varchar(16) binary NOT NULL default '',
+User varchar(16) binary NOT NULL default '',
+PRIMARY KEY (Host,User)
+) TYPE=MyISAM;
+ALTER TABLE t1 DISABLE KEYS;
+LOCK TABLES t1 WRITE;
+INSERT INTO t1 VALUES ('localhost','root'),('localhost',''),('games','monty');
+SHOW INDEX FROM t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
+t1 0 PRIMARY 2 User A 3 NULL NULL BTREE
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+CHECK TABLES t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
+CREATE TABLE t1 (
+Host varchar(16) binary NOT NULL default '',
+User varchar(16) binary NOT NULL default '',
+PRIMARY KEY (Host,User),
+KEY (Host)
+) TYPE=MyISAM;
+ALTER TABLE t1 DISABLE KEYS;
+SHOW INDEX FROM t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
+t1 0 PRIMARY 2 User A 0 NULL NULL BTREE
+t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
+LOCK TABLES t1 WRITE;
+INSERT INTO t1 VALUES ('localhost','root'),('localhost','');
+SHOW INDEX FROM t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
+t1 0 PRIMARY 2 User A 2 NULL NULL BTREE
+t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
+ALTER TABLE t1 ENABLE KEYS;
+SHOW INDEX FROM t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
+t1 0 PRIMARY 2 User A 2 NULL NULL BTREE
+t1 1 Host 1 Host A 1 NULL NULL BTREE
+UNLOCK TABLES;
+CHECK TABLES t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+LOCK TABLES t1 WRITE;
+ALTER TABLE t1 RENAME t2;
+UNLOCK TABLES;
+select * from t2;
+Host User
+localhost
+localhost root
+DROP TABLE t2;
+CREATE TABLE t1 (
+Host varchar(16) binary NOT NULL default '',
+User varchar(16) binary NOT NULL default '',
+PRIMARY KEY (Host,User),
+KEY (Host)
+) TYPE=MyISAM;
+LOCK TABLES t1 WRITE;
+ALTER TABLE t1 DISABLE KEYS;
+SHOW INDEX FROM t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
+t1 0 PRIMARY 2 User A 0 NULL NULL BTREE
+t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
+DROP TABLE t1;