1
drop table if exists t1,t2,t7,t8,t9;
2
drop database if exists mysqltest;
3
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a));
4
create table t2 (a int not null auto_increment, b char(16) not null, primary key (a));
5
insert into t1 (b) values ("test"),("test1"),("test2"),("test3");
6
insert into t2 (b) select b from t1;
7
insert into t1 (b) select b from t2;
8
insert into t2 (b) select b from t1;
9
insert into t1 (b) select b from t2;
10
insert into t2 (b) select b from t1;
11
insert into t1 (b) select b from t2;
12
insert into t2 (b) select b from t1;
13
insert into t1 (b) select b from t2;
14
insert into t2 (b) select b from t1;
15
insert into t1 (b) select b from t2;
16
insert into t2 (b) select b from t1;
17
insert into t1 (b) select b from t2;
18
insert into t2 (b) select b from t1;
19
insert into t1 (b) select b from t2;
20
insert into t2 (b) select b from t1;
21
insert into t1 (b) select b from t2;
22
insert into t2 (b) select b from t1;
23
insert into t1 (b) select b from t2;
25
create temporary table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="MYSQLTEST_VARDIR/tmp" index directory="MYSQLTEST_VARDIR/run";
26
insert into t9 select * from t1;
28
Table Op Msg_type Msg_text
29
test.t9 check status OK
31
Table Op Msg_type Msg_text
32
test.t9 optimize status OK
33
SET GLOBAL myisam_sort_buffer_size=1024;
35
Table Op Msg_type Msg_text
36
test.t9 check status OK
37
alter table t9 add column c int not null;
40
t9 CREATE TEMPORARY TABLE `t9` (
41
`a` int NOT NULL AUTO_INCREMENT,
42
`b` varchar(16) NOT NULL,
46
alter table t9 rename t8, add column d int not null;
47
alter table t8 rename t7;
48
alter table t7 rename t9;
52
t9 CREATE TEMPORARY TABLE `t9` (
53
`a` int NOT NULL AUTO_INCREMENT,
54
`b` varchar(16) NOT NULL,
59
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp";
60
Got one of the listed errors
61
create database mysqltest;
62
create temporary table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="/this-dir-does-not-exist";
63
Got one of the listed errors
64
create temporary table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path";
65
Got one of the listed errors
66
alter table t9 rename mysqltest.t9;
67
select count(*) from mysqltest.t9;
70
show create table mysqltest.t9;
72
t9 CREATE TEMPORARY TABLE `t9` (
73
`a` int NOT NULL AUTO_INCREMENT,
74
`b` varchar(16) NOT NULL,
79
drop database mysqltest;
80
create temporary table t1 (a int not null) engine=myisam;
81
alter table t1 data directory="MYSQLTEST_VARDIR/tmp";
83
Warning 0 DATA DIRECTORY option ignored
86
t1 CREATE TEMPORARY TABLE `t1` (
89
alter table t1 add b int;
90
alter table t1 data directory="MYSQLTEST_VARDIR/log";
92
Warning 0 DATA DIRECTORY option ignored
95
t1 CREATE TEMPORARY TABLE `t1` (
99
alter table t1 index directory="MYSQLTEST_VARDIR/log";
101
Warning 0 INDEX DIRECTORY option ignored
102
show create table t1;
104
t1 CREATE TEMPORARY TABLE `t1` (
109
create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 9 a;
110
show create table t1;
112
t1 CREATE TEMPORARY TABLE `t1` (
115
create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 99 a;
116
show create table t1;
118
t1 CREATE TEMPORARY TABLE `t1` (
123
CREATE TABLE t1(a INT) engine=archive
124
DATA DIRECTORY='/foo/bar/far';
125
ERROR HY000: Can't create table 'test.t1' (errno: 9)
126
CREATE TABLE t1(a INT) DATA DIRECTORY='MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='MYSQLTEST_VARDIR/tmp';
127
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'DATA DIRECTORY'
129
SET GLOBAL myisam_sort_buffer_size=DEFAULT;