2001-09-28 07:05:54 +02:00
|
|
|
drop table if exists t1,t2,t7,t8,t9;
|
2003-07-03 18:23:06 +02:00
|
|
|
drop database if exists mysqltest;
|
2001-09-28 07:05:54 +02:00
|
|
|
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a));
|
|
|
|
create table t2 (a int not null auto_increment, b char(16) not null, primary key (a));
|
|
|
|
insert into t1 (b) values ("test"),("test1"),("test2"),("test3");
|
|
|
|
insert into t2 (b) select b from t1;
|
|
|
|
insert into t1 (b) select b from t2;
|
|
|
|
insert into t2 (b) select b from t1;
|
|
|
|
insert into t1 (b) select b from t2;
|
|
|
|
insert into t2 (b) select b from t1;
|
|
|
|
insert into t1 (b) select b from t2;
|
|
|
|
insert into t2 (b) select b from t1;
|
|
|
|
insert into t1 (b) select b from t2;
|
|
|
|
insert into t2 (b) select b from t1;
|
|
|
|
insert into t1 (b) select b from t2;
|
|
|
|
insert into t2 (b) select b from t1;
|
|
|
|
insert into t1 (b) select b from t2;
|
|
|
|
insert into t2 (b) select b from t1;
|
|
|
|
insert into t1 (b) select b from t2;
|
|
|
|
insert into t2 (b) select b from t1;
|
|
|
|
insert into t1 (b) select b from t2;
|
|
|
|
insert into t2 (b) select b from t1;
|
|
|
|
insert into t1 (b) select b from t2;
|
|
|
|
drop table t2;
|
|
|
|
insert into t9 select * from t1;
|
|
|
|
check table t9;
|
2001-06-05 02:38:10 +02:00
|
|
|
Table Op Msg_type Msg_text
|
|
|
|
test.t9 check status OK
|
2001-09-28 07:05:54 +02:00
|
|
|
optimize table t9;
|
2001-06-05 02:38:10 +02:00
|
|
|
Table Op Msg_type Msg_text
|
|
|
|
test.t9 optimize status OK
|
2001-09-28 07:05:54 +02:00
|
|
|
repair table t9;
|
2001-06-05 02:38:10 +02:00
|
|
|
Table Op Msg_type Msg_text
|
|
|
|
test.t9 repair status OK
|
2001-09-28 07:05:54 +02:00
|
|
|
alter table t9 add column c int not null;
|
|
|
|
show create table t9;
|
2001-06-05 02:38:10 +02:00
|
|
|
Table Create Table
|
|
|
|
t9 CREATE TABLE `t9` (
|
|
|
|
`a` int(11) NOT NULL auto_increment,
|
2003-05-24 20:30:55 +02:00
|
|
|
`b` char(16) NOT NULL default '',
|
2001-06-05 02:38:10 +02:00
|
|
|
`c` int(11) NOT NULL default '0',
|
|
|
|
PRIMARY KEY (`a`)
|
2003-12-10 05:31:42 +01:00
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
|
2001-09-28 07:05:54 +02:00
|
|
|
alter table t9 rename t8, add column d int not null;
|
|
|
|
alter table t8 rename t7;
|
|
|
|
rename table t7 to t9;
|
|
|
|
drop table t1;
|
2001-11-28 02:47:15 +01:00
|
|
|
Got one of the listed errors
|
|
|
|
Got one of the listed errors
|
|
|
|
Got one of the listed errors
|
|
|
|
Got one of the listed errors
|
|
|
|
Got one of the listed errors
|
2003-07-03 18:23:06 +02:00
|
|
|
alter table t9 rename mysqltest.t9;
|
|
|
|
select count(*) from mysqltest.t9;
|
2001-06-05 02:38:10 +02:00
|
|
|
count(*)
|
|
|
|
16724
|
2003-07-03 18:23:06 +02:00
|
|
|
show create table mysqltest.t9;
|
2001-06-05 02:38:10 +02:00
|
|
|
Table Create Table
|
|
|
|
t9 CREATE TABLE `t9` (
|
|
|
|
`a` int(11) NOT NULL auto_increment,
|
2003-05-24 20:30:55 +02:00
|
|
|
`b` char(16) NOT NULL default '',
|
2001-06-05 02:38:10 +02:00
|
|
|
`c` int(11) NOT NULL default '0',
|
|
|
|
`d` int(11) NOT NULL default '0',
|
|
|
|
PRIMARY KEY (`a`)
|
2003-12-10 05:31:42 +01:00
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/'
|
2003-07-03 18:23:06 +02:00
|
|
|
drop database mysqltest;
|
2004-02-17 01:26:35 +01:00
|
|
|
create table t1 (a int not null) engine=myisam;
|
2003-12-12 21:26:58 +01:00
|
|
|
show create table t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
|
|
|
`a` int(11) NOT NULL default '0'
|
2003-12-19 15:25:50 +01:00
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
2003-12-12 21:26:58 +01:00
|
|
|
alter table t1 add b int;
|
|
|
|
show create table t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
|
|
|
`a` int(11) NOT NULL default '0',
|
|
|
|
`b` int(11) default NULL
|
2003-12-19 15:25:50 +01:00
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
2003-12-12 21:26:58 +01:00
|
|
|
show create table t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
|
|
|
`a` int(11) NOT NULL default '0',
|
|
|
|
`b` int(11) default NULL
|
2003-12-19 15:25:50 +01:00
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
2003-12-12 21:26:58 +01:00
|
|
|
drop table t1;
|
2005-02-23 22:59:04 +01:00
|
|
|
show create table t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
|
|
|
`i` int(11) default NULL
|
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
|
|
|
drop table t1;
|
|
|
|
show create table t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
|
|
|
`i` int(11) default NULL
|
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
|
|
|
drop table t1;
|