22
22
insert into t2 (b) select b from t1;
23
23
insert into t1 (b) select b from t2;
25
create 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";
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
26
insert into t9 select * from t1;
28
28
Table Op Msg_type Msg_text
37
37
alter table t9 add column c int not null;
38
38
show create table t9;
40
t9 CREATE TABLE `t9` (
40
t9 CREATE TEMPORARY TABLE `t9` (
41
41
`a` int NOT NULL AUTO_INCREMENT,
42
42
`b` varchar(16) NOT NULL,
45
) ENGINE=MyISAM AUTO_INCREMENT=16725 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
45
) ENGINE=MyISAM AUTO_INCREMENT=16725 INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
46
46
alter table t9 rename t8, add column d int not null;
47
47
alter table t8 rename t7;
48
rename table t7 to t9;
48
alter table t7 rename t9;
50
50
SHOW CREATE TABLE t9;
52
t9 CREATE TABLE `t9` (
52
t9 CREATE TEMPORARY TABLE `t9` (
53
53
`a` int NOT NULL AUTO_INCREMENT,
54
54
`b` varchar(16) NOT NULL,
58
) ENGINE=MyISAM AUTO_INCREMENT=16725 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
58
) ENGINE=MyISAM AUTO_INCREMENT=16725 INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
59
59
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp";
60
60
Got one of the listed errors
61
61
create database mysqltest;
62
create 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 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
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="MYSQLTEST_VARDIR/run";
67
Got one of the listed errors
68
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="MYSQLTEST_VARDIR/tmp";
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";
69
65
Got one of the listed errors
70
66
alter table t9 rename mysqltest.t9;
71
67
select count(*) from mysqltest.t9;
74
70
show create table mysqltest.t9;
76
t9 CREATE TABLE `t9` (
72
t9 CREATE TEMPORARY TABLE `t9` (
77
73
`a` int NOT NULL AUTO_INCREMENT,
78
74
`b` varchar(16) NOT NULL,
82
) ENGINE=MyISAM AUTO_INCREMENT=16725 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
78
) ENGINE=MyISAM AUTO_INCREMENT=16725
83
79
drop database mysqltest;
84
create table t1 (a int not null) engine=myisam;
80
create temporary table t1 (a int not null) engine=myisam;
85
81
alter table t1 data directory="MYSQLTEST_VARDIR/tmp";
87
83
Warning 0 DATA DIRECTORY option ignored
88
84
show create table t1;
90
t1 CREATE TABLE `t1` (
86
t1 CREATE TEMPORARY TABLE `t1` (
93
89
alter table t1 add b int;
105
101
Warning 0 INDEX DIRECTORY option ignored
106
102
show create table t1;
107
103
Table Create Table
108
t1 CREATE TABLE `t1` (
104
t1 CREATE TEMPORARY TABLE `t1` (
109
105
`a` int NOT NULL,
110
106
`b` int DEFAULT NULL
113
CREATE TABLE t1(a INT)
114
DATA DIRECTORY='TEST_DIR/tmp'
115
INDEX DIRECTORY='TEST_DIR/tmp' ENGINE=MyISAM;
116
Got one of the listed errors
117
CREATE TABLE t2(a INT)
118
DATA DIRECTORY='TEST_DIR/tmp'
119
INDEX DIRECTORY='TEST_DIR/tmp' ENGINE=MyISAM;
120
RENAME TABLE t2 TO t1;
121
ERROR HY000: Can't create file 'TEST_DIR/tmp/t1.MYI' (errno: 17)
123
109
create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 9 a;
124
110
show create table t1;
125
111
Table Create Table
132
118
t1 CREATE TEMPORARY TABLE `t1` (
133
119
`a` int DEFAULT NULL
134
120
) ENGINE=MyISAM DATA DIRECTORY='MYSQLTEST_VARDIR/log/'
135
create table t1 (a int) engine=myisam select 42 a;
148
CREATE TABLE t1(a INT)
149
INDEX DIRECTORY='TEST_DIR/master-data/mysql';
150
ERROR HY000: Incorrect arguments to INDEX DIRECTORY
151
CREATE TABLE t1(a INT)
152
DATA DIRECTORY='TEST_DIR/master-data/test';
153
ERROR HY000: Incorrect arguments to DATA DIRECTORY
154
CREATE TABLE t1(a INT)
155
DATA DIRECTORY='TEST_DIR/master-data/';
156
ERROR HY000: Incorrect arguments to DATA DIRECTORY
157
CREATE TABLE t1(a INT)
158
INDEX DIRECTORY='TEST_DIR/master-data';
159
ERROR HY000: Incorrect arguments to INDEX DIRECTORY
160
123
CREATE TABLE t1(a INT) DATA DIRECTORY='MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='MYSQLTEST_VARDIR/tmp';