summaryrefslogtreecommitdiff
path: root/mysql-test/r/alter_table.result
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-05-14 18:31:22 +0300
committerunknown <monty@mysql.com>2005-05-14 18:31:22 +0300
commitf8f714a2fbd821488aa3d8e39d6c3a944c7b1aa1 (patch)
treec08ee86cd9f77c3a7dc13b02b09371ccd19f2b88 /mysql-test/r/alter_table.result
parentbb2b8120615f48cd17682aa810e54b20a7002c77 (diff)
parent78f2e7b53db62a3bc67dcb5ed20dfe47cf680c66 (diff)
downloadmariadb-git-f8f714a2fbd821488aa3d8e39d6c3a944c7b1aa1.tar.gz
Merge with 4.1
BitKeeper/etc/logging_ok: auto-union BitKeeper/deleted/.del-errmsg.txt~11edc4db89248c16: Auto merged BitKeeper/deleted/.del-errmsg.txt~184eb1f09242dc72: Auto merged BitKeeper/deleted/.del-errmsg.txt~2cdeb8d6f80eba72: Auto merged BitKeeper/deleted/.del-errmsg.txt~4617575065d612b9: Auto merged BitKeeper/deleted/.del-errmsg.txt~587903f9311db2d1: Auto merged BitKeeper/deleted/.del-errmsg.txt~606dfaeb9e81aa4e: Auto merged BitKeeper/deleted/.del-errmsg.txt~6bbd9eac7f0e6b89: Auto merged BitKeeper/deleted/.del-errmsg.txt~7397c423c52c6d2c: Auto merged BitKeeper/deleted/.del-errmsg.txt~898865062c970766: Auto merged BitKeeper/deleted/.del-errmsg.txt~8ed1999cbd481dc4: Auto merged BitKeeper/deleted/.del-errmsg.txt~94a93cc742fca24d: Auto merged BitKeeper/deleted/.del-errmsg.txt~9dab24f7fb11b1e1: Auto merged BitKeeper/deleted/.del-errmsg.txt~b44a85a177954da0: Auto merged BitKeeper/deleted/.del-errmsg.txt~b6181e29d8282b06: Auto merged BitKeeper/deleted/.del-errmsg.txt~ba132dc9bc936c8a: Auto merged BitKeeper/deleted/.del-errmsg.txt~e2609fdf7870795: Auto merged BitKeeper/deleted/.del-errmsg.txt~e3183b99fbba0a9c: Auto merged BitKeeper/deleted/.del-errmsg.txt~eeb2c47537ed9c23: Auto merged BitKeeper/deleted/.del-errmsg.txt~ef28b592c7591b7: Auto merged BitKeeper/deleted/.del-errmsg.txt~ef53c33ac0ff8a84: Auto merged BitKeeper/deleted/.del-errmsg.txt~f19bfd5d4c918964: Auto merged BitKeeper/deleted/.del-errmsg.txt~f96b7055cac394e: Auto merged libmysql/libmysql.c: Auto merged myisam/mi_key.c: Auto merged mysql-test/r/alter_table.result: Auto merged mysql-test/r/auto_increment.result: Auto merged mysql-test/r/innodb.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/t/alter_table.test: Auto merged mysql-test/t/innodb.test: Auto merged mysql-test/t/select.test: Auto merged sql/handler.h: Auto merged sql/item_func.cc: Auto merged sql/sql_yacc.yy: Auto merged mysql-test/r/insert_update.result: Auto merged strings/ctype-ucs2.c: Auto merged sql/sql_table.cc: merge sql/unireg.cc: merge
Diffstat (limited to 'mysql-test/r/alter_table.result')
-rw-r--r--mysql-test/r/alter_table.result189
1 files changed, 114 insertions, 75 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index 88b04b292ea..e91a164db6f 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -303,6 +303,120 @@ 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)
+) ENGINE=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)
+) ENGINE=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)
+) ENGINE=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;
+create table t1 (a int);
+alter table t1 rename to `t1\\`;
+ERROR 42000: Incorrect table name 't1\\'
+rename table t1 to `t1\\`;
+ERROR 42000: Incorrect table name 't1\\'
+drop table t1;
+drop table if exists t1, t2;
+Warnings:
+Note 1051 Unknown table 't1'
+Note 1051 Unknown table 't2'
+create table t1 ( a varchar(10) not null primary key ) engine=myisam;
+create table t2 ( a varchar(10) not null primary key ) engine=merge union=(t1);
+flush tables;
+alter table t1 modify a varchar(10);
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` varchar(10) NOT NULL default '',
+ PRIMARY KEY (`a`)
+) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`)
+flush tables;
+alter table t1 modify a varchar(10) not null;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` varchar(10) NOT NULL default '',
+ PRIMARY KEY (`a`)
+) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`)
+drop table if exists t1, t2;
+create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
+insert into t1 (a) values(1);
+show table status like 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 MyISAM 9 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL
+alter table t1 modify a int;
+show table status like 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 MyISAM 9 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL
+drop table t1;
+create table t1 (a int not null, b int not null, c int not null, d int not null, e int not null, f int not null, g int not null, h int not null,i int not null, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
+insert into t1 (a) values(1);
+show table status like 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 MyISAM 9 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL
+drop table t1;
set names koi8r;
create table t1 (a char(10) character set koi8r);
insert into t1 values ('ΤΕΣΤ');
@@ -382,75 +496,6 @@ t1 CREATE TABLE `t1` (
`mytext` longtext character set latin1 collate latin1_general_cs
) ENGINE=MyISAM DEFAULT CHARSET=latin2
drop table t1;
-CREATE TABLE t1 (
-Host varchar(16) binary NOT NULL default '',
-User varchar(16) binary NOT NULL default '',
-PRIMARY KEY (Host,User)
-) ENGINE=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)
-) ENGINE=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)
-) ENGINE=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;
CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE);
ALTER TABLE t1 DROP PRIMARY KEY;
SHOW CREATE TABLE t1;
@@ -469,12 +514,6 @@ alter table t1 drop key no_such_key;
ERROR 42000: Can't DROP 'no_such_key'; check that column/key exists
alter table t1 drop key a;
drop table t1;
-create table t1 (a int);
-alter table t1 rename to `t1\\`;
-ERROR 42000: Incorrect table name 't1\\'
-rename table t1 to `t1\\`;
-ERROR 42000: Incorrect table name 't1\\'
-drop table t1;
create table t1 (a text) character set koi8r;
insert into t1 values (_koi8r'ΤΕΣΤ');
select hex(a) from t1;