@@ -22,6 +22,7 @@ insert into t1 (b) select b from t2;
...
@@ -22,6 +22,7 @@ insert into t1 (b) select b from t2;
insert into t2 (b) select b from t1;
insert into t2 (b) select b from t1;
insert into t1 (b) select b from t2;
insert into t1 (b) select b from t2;
drop table t2;
drop table t2;
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";
insert into t9 select * from t1;
insert into t9 select * from t1;
check table t9;
check table t9;
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
...
@@ -54,10 +55,16 @@ t9 CREATE TABLE `t9` (
...
@@ -54,10 +55,16 @@ t9 CREATE TABLE `t9` (
`d` int(11) NOT NULL,
`d` int(11) NOT NULL,
PRIMARY KEY (`a`)
PRIMARY KEY (`a`)
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp";
Got one of the listed errors
Got one of the listed errors
create database mysqltest;
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";
Got one of the listed errors
Got one of the listed errors
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";
Got one of the listed errors
Got one of the listed errors
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";
Got one of the listed errors
Got one of the listed errors
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";
Got one of the listed errors
Got one of the listed errors
alter table t9 rename mysqltest.t9;
alter table t9 rename mysqltest.t9;
select count(*) from mysqltest.t9;
select count(*) from mysqltest.t9;
...
@@ -74,6 +81,7 @@ t9 CREATE TABLE `t9` (
...
@@ -74,6 +81,7 @@ t9 CREATE TABLE `t9` (
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
drop database mysqltest;
drop database mysqltest;
create table t1 (a int not null) engine=myisam;
create table t1 (a int not null) engine=myisam;
alter table t1 data directory="MYSQLTEST_VARDIR/tmp";
Warnings:
Warnings:
Warning 0 DATA DIRECTORY option ignored
Warning 0 DATA DIRECTORY option ignored
show create table t1;
show create table t1;
...
@@ -82,6 +90,7 @@ t1 CREATE TABLE `t1` (
...
@@ -82,6 +90,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL
`a` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 add b int;
alter table t1 add b int;
alter table t1 data directory="MYSQLTEST_VARDIR/log";
Warnings:
Warnings:
Warning 0 DATA DIRECTORY option ignored
Warning 0 DATA DIRECTORY option ignored
show create table t1;
show create table t1;
...
@@ -90,6 +99,7 @@ t1 CREATE TABLE `t1` (
...
@@ -90,6 +99,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`a` int(11) NOT NULL,
`b` int(11) DEFAULT NULL
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 index directory="MYSQLTEST_VARDIR/log";
Warnings:
Warnings:
Warning 0 INDEX DIRECTORY option ignored
Warning 0 INDEX DIRECTORY option ignored
show create table t1;
show create table t1;
...
@@ -102,18 +112,20 @@ drop table t1;
...
@@ -102,18 +112,20 @@ drop table t1;
CREATE TABLE t1(a INT)
CREATE TABLE t1(a INT)
DATA DIRECTORY='TEST_DIR/tmp'
DATA DIRECTORY='TEST_DIR/tmp'
INDEX DIRECTORY='TEST_DIR/tmp';
INDEX DIRECTORY='TEST_DIR/tmp';
ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17)
Got one of the listed errors
CREATE TABLE t2(a INT)
CREATE TABLE t2(a INT)
DATA DIRECTORY='TEST_DIR/tmp'
DATA DIRECTORY='TEST_DIR/tmp'
INDEX DIRECTORY='TEST_DIR/tmp';
INDEX DIRECTORY='TEST_DIR/tmp';
RENAME TABLE t2 TO t1;
RENAME TABLE t2 TO t1;
ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17)
ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17)
DROP TABLE t2;
DROP TABLE t2;
create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 9 a;
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
t1 CREATE TEMPORARY TABLE `t1` (
`a` int(11) DEFAULT NULL
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/'
create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 99 a;
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
t1 CREATE TEMPORARY TABLE `t1` (
...
@@ -140,10 +152,10 @@ DROP TABLE t1;
...
@@ -140,10 +152,10 @@ DROP TABLE t1;
End of 5.0 tests
End of 5.0 tests
CREATE TABLE t1(a INT)
CREATE TABLE t1(a INT)
INDEX DIRECTORY='TEST_DIR/master-data/mysql';
INDEX DIRECTORY='TEST_DIR/master-data/mysql';
ERROR HY000: Incorrect arguments to INDEX DIRECORY
ERROR HY000: Incorrect arguments to INDEX DIRECTORY
CREATE TABLE t1(a INT)
CREATE TABLE t1(a INT)
DATA DIRECTORY='TEST_DIR/master-data/test';
DATA DIRECTORY='TEST_DIR/master-data/test';
ERROR HY000: Incorrect arguments to DATA DIRECORY
ERROR HY000: Incorrect arguments to DATA DIRECTORY