Commit 7674605d authored by unknown's avatar unknown

Fix paths in test and result files


mysql-test/r/loaddata.result:
  Update paths in result
mysql-test/r/myisam.result:
  Update paths in result
mysql-test/r/partition_not_windows.result:
  Update paths in result
mysql-test/r/symlink.result:
  Update paths in result
mysql-test/suite/binlog/r/binlog_index.result:
  Update paths in result
mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test:
  Update paths
mysql-test/suite/binlog/t/binlog_index.test:
  Update paths
mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test:
  Fix merge error s/start-position/stop-position/
mysql-test/t/drop.test:
  Update paths
mysql-test/t/loaddata.test:
  Update paths
mysql-test/t/myisam.test:
  Update paths
mysql-test/t/partition_not_windows.test:
  Update paths
mysql-test/t/symlink.test:
  Update paths
parent 3ad40257
...@@ -277,7 +277,7 @@ CREATE VIEW v1 AS SELECT * FROM t1; ...@@ -277,7 +277,7 @@ CREATE VIEW v1 AS SELECT * FROM t1;
CREATE VIEW v2 AS SELECT 1 + 2 AS c0, c1, c2 FROM t1; CREATE VIEW v2 AS SELECT 1 + 2 AS c0, c1, c2 FROM t1;
CREATE VIEW v3 AS SELECT 1 AS d1, 2 AS d2; CREATE VIEW v3 AS SELECT 1 AS d1, 2 AS d2;
LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v1 LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v1
FIELDS ESCAPED BY '\\' FIELDS ESCAPED BY '\\'
TERMINATED BY ',' TERMINATED BY ','
ENCLOSED BY '"' ENCLOSED BY '"'
...@@ -297,7 +297,7 @@ c1 c2 ...@@ -297,7 +297,7 @@ c1 c2
DELETE FROM t1; DELETE FROM t1;
LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v2 LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v2
FIELDS ESCAPED BY '\\' FIELDS ESCAPED BY '\\'
TERMINATED BY ',' TERMINATED BY ','
ENCLOSED BY '"' ENCLOSED BY '"'
...@@ -317,14 +317,14 @@ c0 c1 c2 ...@@ -317,14 +317,14 @@ c0 c1 c2
DELETE FROM t1; DELETE FROM t1;
LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v2 LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v2
FIELDS ESCAPED BY '\\' FIELDS ESCAPED BY '\\'
TERMINATED BY ',' TERMINATED BY ','
ENCLOSED BY '"' ENCLOSED BY '"'
LINES TERMINATED BY '\n' (c0, c2); LINES TERMINATED BY '\n' (c0, c2);
ERROR HY000: Invalid column reference (v2.c0) in LOAD DATA ERROR HY000: Invalid column reference (v2.c0) in LOAD DATA
LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v3 LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v3
FIELDS ESCAPED BY '\\' FIELDS ESCAPED BY '\\'
TERMINATED BY ',' TERMINATED BY ','
ENCLOSED BY '"' ENCLOSED BY '"'
......
...@@ -2194,7 +2194,7 @@ KEY (c1), ...@@ -2194,7 +2194,7 @@ KEY (c1),
KEY (c2) KEY (c2)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0;
MyISAM file: MYSQLTEST_VARDIR/master-data/test/t1 MyISAM file: MYSQLD_DATADIR/test/t1
Record format: Packed Record format: Packed
Character set: utf8_general_ci (33) Character set: utf8_general_ci (33)
Data records: 0 Deleted blocks: 0 Data records: 0 Deleted blocks: 0
......
...@@ -35,20 +35,20 @@ DROP TABLE t1, t2; ...@@ -35,20 +35,20 @@ DROP TABLE t1, t2;
set @@sql_mode=@org_mode; set @@sql_mode=@org_mode;
CREATE TABLE t1(a INT) CREATE TABLE t1(a INT)
PARTITION BY KEY (a) PARTITION BY KEY (a)
(PARTITION p0 DATA DIRECTORY 'TEST_DIR/master-data/test'); (PARTITION p0 DATA DIRECTORY 'MYSQLD_DATADIR/test');
ERROR HY000: Incorrect arguments to DATA DIRECTORY ERROR HY000: Incorrect arguments to DATA DIRECTORY
CREATE TABLE t1(a INT) CREATE TABLE t1(a INT)
PARTITION BY KEY (a) PARTITION BY KEY (a)
(PARTITION p0 INDEX DIRECTORY 'TEST_DIR/master-data/test'); (PARTITION p0 INDEX DIRECTORY 'MYSQLD_DATADIR/test');
ERROR HY000: Incorrect arguments to INDEX DIRECTORY ERROR HY000: Incorrect arguments to INDEX DIRECTORY
CREATE TABLE ts (id INT, purchased DATE) CREATE TABLE ts (id INT, purchased DATE)
PARTITION BY RANGE(YEAR(purchased)) PARTITION BY RANGE(YEAR(purchased))
SUBPARTITION BY HASH(TO_DAYS(purchased)) ( SUBPARTITION BY HASH(TO_DAYS(purchased)) (
PARTITION p0 VALUES LESS THAN (1990) ( PARTITION p0 VALUES LESS THAN (1990) (
SUBPARTITION s0a SUBPARTITION s0a
DATA DIRECTORY = 'TEST_DIR/master-data/test', DATA DIRECTORY = 'MYSQLD_DATADIR/test',
SUBPARTITION s0b SUBPARTITION s0b
DATA DIRECTORY = 'TEST_DIR/master-data/test' DATA DIRECTORY = 'MYSQLD_DATADIR/test'
)); ));
ERROR HY000: Incorrect arguments to DATA DIRECTORY ERROR HY000: Incorrect arguments to DATA DIRECTORY
CREATE TABLE ts (id INT, purchased DATE) CREATE TABLE ts (id INT, purchased DATE)
...@@ -56,9 +56,9 @@ PARTITION BY RANGE(YEAR(purchased)) ...@@ -56,9 +56,9 @@ PARTITION BY RANGE(YEAR(purchased))
SUBPARTITION BY HASH(TO_DAYS(purchased)) ( SUBPARTITION BY HASH(TO_DAYS(purchased)) (
PARTITION p0 VALUES LESS THAN (1990) ( PARTITION p0 VALUES LESS THAN (1990) (
SUBPARTITION s0a SUBPARTITION s0a
INDEX DIRECTORY = 'TEST_DIR/master-data/test', INDEX DIRECTORY = 'MYSQLD_DATADIR/test',
SUBPARTITION s0b SUBPARTITION s0b
INDEX DIRECTORY = 'TEST_DIR/master-data/test' INDEX DIRECTORY = 'MYSQLD_DATADIR/test'
)); ));
ERROR HY000: Incorrect arguments to INDEX DIRECTORY ERROR HY000: Incorrect arguments to INDEX DIRECTORY
DROP TABLE IF EXISTS `example`; DROP TABLE IF EXISTS `example`;
......
...@@ -151,16 +151,16 @@ CREATE TABLE t1 (a INT) ENGINE MYISAM; ...@@ -151,16 +151,16 @@ CREATE TABLE t1 (a INT) ENGINE MYISAM;
DROP TABLE t1; 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='MYSQLD_DATADIR/mysql';
ERROR HY000: Incorrect arguments to INDEX DIRECTORY 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='MYSQLD_DATADIR/test';
ERROR HY000: Incorrect arguments to DATA DIRECTORY ERROR HY000: Incorrect arguments to DATA DIRECTORY
CREATE TABLE t1(a INT) CREATE TABLE t1(a INT)
DATA DIRECTORY='TEST_DIR/master-data/'; DATA DIRECTORY='MYSQLD_DATADIR/';
ERROR HY000: Incorrect arguments to DATA DIRECTORY ERROR HY000: Incorrect arguments to DATA DIRECTORY
CREATE TABLE t1(a INT) CREATE TABLE t1(a INT)
INDEX DIRECTORY='TEST_DIR/master-data'; INDEX DIRECTORY='MYSQLD_DATADIR';
ERROR HY000: Incorrect arguments to INDEX DIRECTORY ERROR HY000: Incorrect arguments to INDEX DIRECTORY
CREATE TABLE t1(a INT) CREATE TABLE t1(a INT)
INDEX DIRECTORY='TEST_DIR/master-data_var'; INDEX DIRECTORY='TEST_DIR/master-data_var';
......
...@@ -9,7 +9,7 @@ master-bin.000003 # ...@@ -9,7 +9,7 @@ master-bin.000003 #
master-bin.000004 # master-bin.000004 #
purge binary logs TO 'master-bin.000004'; purge binary logs TO 'master-bin.000004';
Warnings: Warnings:
Warning 1612 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found Warning 1612 Being purged log ./master-bin.000001 was not found
*** must show a list starting from the 'TO' argument of PURGE *** *** must show a list starting from the 'TO' argument of PURGE ***
show binary logs; show binary logs;
Log_name File_size Log_name File_size
...@@ -20,7 +20,7 @@ flush logs; ...@@ -20,7 +20,7 @@ flush logs;
flush logs; flush logs;
*** must be a warning master-bin.000001 was not found *** *** must be a warning master-bin.000001 was not found ***
Warnings: Warnings:
Warning 1612 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found Warning 1612 Being purged log ./master-bin.000001 was not found
*** must show one record, of the active binlog, left in the index file after PURGE *** *** must show one record, of the active binlog, left in the index file after PURGE ***
show binary logs; show binary logs;
Log_name File_size Log_name File_size
...@@ -33,7 +33,7 @@ purge binary logs TO 'master-bin.000002'; ...@@ -33,7 +33,7 @@ purge binary logs TO 'master-bin.000002';
ERROR HY000: Fatal error during log purge ERROR HY000: Fatal error during log purge
show warnings; show warnings;
Level Code Message Level Code Message
Error 1377 a problem with deleting MYSQLTEST_VARDIR/log/master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files Error 1377 a problem with deleting ./master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files
Error 1377 Fatal error during log purge Error 1377 Fatal error during log purge
reset master; reset master;
End of tests End of tests
...@@ -17,9 +17,11 @@ ...@@ -17,9 +17,11 @@
source include/have_log_bin.inc; source include/have_log_bin.inc;
copy_file $MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 $MYSQLTEST_VARDIR/master-data/slave-relay-bin.000001; let $MYSQLD_DATADIR= `select @@datadir`;
write_file $MYSQLTEST_VARDIR/master-data/slave-relay-bin.index; copy_file $MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 $MYSQLD_DATADIR/slave-relay-bin.000001;
write_file $MYSQLD_DATADIR/slave-relay-bin.index;
slave-relay-bin.000001 slave-relay-bin.000001
EOF EOF
...@@ -46,8 +48,8 @@ DROP FUNCTION IF EXISTS f1; ...@@ -46,8 +48,8 @@ DROP FUNCTION IF EXISTS f1;
DROP TRIGGER IF EXISTS tr1; DROP TRIGGER IF EXISTS tr1;
enable_warnings; enable_warnings;
remove_file $MYSQLTEST_VARDIR/master-data/slave-relay-bin.000001; remove_file $MYSQLD_DATADIR/slave-relay-bin.000001;
remove_file $MYSQLTEST_VARDIR/master-data/slave-relay-bin.index; remove_file $MYSQLD_DATADIR/slave-relay-bin.index;
stop slave sql_thread; stop slave sql_thread;
let $keep_connection=1; let $keep_connection=1;
source include/wait_for_slave_sql_to_stop.inc; source include/wait_for_slave_sql_to_stop.inc;
......
...@@ -14,10 +14,10 @@ flush logs; ...@@ -14,10 +14,10 @@ flush logs;
source include/show_binary_logs.inc; source include/show_binary_logs.inc;
remove_file $MYSQLTEST_VARDIR/log/master-bin.000001; let $MYSQLD_DATADIR= `select @@datadir`;
remove_file $MYSQLD_DATADIR/master-bin.000001;
# there must be a warning with file names # there must be a warning with file names
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
purge binary logs TO 'master-bin.000004'; purge binary logs TO 'master-bin.000004';
--echo *** must show a list starting from the 'TO' argument of PURGE *** --echo *** must show a list starting from the 'TO' argument of PURGE ***
...@@ -32,12 +32,11 @@ reset master; ...@@ -32,12 +32,11 @@ reset master;
flush logs; flush logs;
flush logs; flush logs;
flush logs; flush logs;
remove_file $MYSQLTEST_VARDIR/log/master-bin.000001; remove_file $MYSQLD_DATADIR/master-bin.000001;
--echo *** must be a warning master-bin.000001 was not found *** --echo *** must be a warning master-bin.000001 was not found ***
let $date=`select NOW() + INTERVAL 1 MINUTE`; let $date=`select NOW() + INTERVAL 1 MINUTE`;
--disable_query_log --disable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval purge binary logs BEFORE '$date'; eval purge binary logs BEFORE '$date';
--enable_query_log --enable_query_log
...@@ -55,14 +54,13 @@ flush logs; ...@@ -55,14 +54,13 @@ flush logs;
flush logs; flush logs;
flush logs; flush logs;
remove_file $MYSQLTEST_VARDIR/log/master-bin.000001; remove_file $MYSQLD_DATADIR/master-bin.000001;
mkdir $MYSQLTEST_VARDIR/log/master-bin.000001; mkdir $MYSQLD_DATADIR/master-bin.000001;
--error ER_BINLOG_PURGE_FATAL_ERR --error ER_BINLOG_PURGE_FATAL_ERR
purge binary logs TO 'master-bin.000002'; purge binary logs TO 'master-bin.000002';
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
show warnings; show warnings;
rmdir $MYSQLTEST_VARDIR/log/master-bin.000001; rmdir $MYSQLD_DATADIR/master-bin.000001;
--disable_warnings --disable_warnings
reset master; reset master;
--enable_warnings --enable_warnings
......
...@@ -170,7 +170,7 @@ select "--- Test 2 position test --" as ""; ...@@ -170,7 +170,7 @@ select "--- Test 2 position test --" as "";
--enable_query_log --enable_query_log
let $MYSQLD_DATADIR= `select @@datadir;`; let $MYSQLD_DATADIR= `select @@datadir;`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416 --start-position=569 $MYSQLD_DATADIR/master-bin.000001 --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416 --stop-position=569 $MYSQLD_DATADIR/master-bin.000001
# These are tests for remote binlog. # These are tests for remote binlog.
# They should return the same as previous test. # They should return the same as previous test.
......
...@@ -149,17 +149,18 @@ DROP DATABASE IF EXISTS mysql_test; ...@@ -149,17 +149,18 @@ DROP DATABASE IF EXISTS mysql_test;
CREATE DATABASE mysql_test; CREATE DATABASE mysql_test;
--copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.frm $MYSQLTEST_VARDIR/tmp/bug29958.proc.frm let $MYSQLD_DATADIR= `select @@datadir`;
--copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.MYD $MYSQLTEST_VARDIR/tmp/bug29958.proc.MYD --copy_file $MYSQLD_DATADIR/mysql/proc.frm $MYSQLTEST_VARDIR/tmp/bug29958.proc.frm
--copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.MYI $MYSQLTEST_VARDIR/tmp/bug29958.proc.MYI --copy_file $MYSQLD_DATADIR/mysql/proc.MYD $MYSQLTEST_VARDIR/tmp/bug29958.proc.MYD
--copy_file $MYSQLD_DATADIR/mysql/proc.MYI $MYSQLTEST_VARDIR/tmp/bug29958.proc.MYI
DROP TABLE mysql.proc; DROP TABLE mysql.proc;
DROP DATABASE mysql_test; DROP DATABASE mysql_test;
--copy_file $MYSQLTEST_VARDIR/tmp/bug29958.proc.frm $MYSQLTEST_VARDIR/master-data/mysql/proc.frm --copy_file $MYSQLTEST_VARDIR/tmp/bug29958.proc.frm $MYSQLD_DATADIR/mysql/proc.frm
--copy_file $MYSQLTEST_VARDIR/tmp/bug29958.proc.MYD $MYSQLTEST_VARDIR/master-data/mysql/proc.MYD --copy_file $MYSQLTEST_VARDIR/tmp/bug29958.proc.MYD $MYSQLD_DATADIR/mysql/proc.MYD
--copy_file $MYSQLTEST_VARDIR/tmp/bug29958.proc.MYI $MYSQLTEST_VARDIR/master-data/mysql/proc.MYI --copy_file $MYSQLTEST_VARDIR/tmp/bug29958.proc.MYI $MYSQLD_DATADIR/mysql/proc.MYI
--echo --echo
--echo # -- --echo # --
......
...@@ -264,7 +264,7 @@ CREATE VIEW v2 AS SELECT 1 + 2 AS c0, c1, c2 FROM t1; ...@@ -264,7 +264,7 @@ CREATE VIEW v2 AS SELECT 1 + 2 AS c0, c1, c2 FROM t1;
CREATE VIEW v3 AS SELECT 1 AS d1, 2 AS d2; CREATE VIEW v3 AS SELECT 1 AS d1, 2 AS d2;
--echo --echo
LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v1 LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v1
FIELDS ESCAPED BY '\\' FIELDS ESCAPED BY '\\'
TERMINATED BY ',' TERMINATED BY ','
ENCLOSED BY '"' ENCLOSED BY '"'
...@@ -280,7 +280,7 @@ SELECT * FROM v1; ...@@ -280,7 +280,7 @@ SELECT * FROM v1;
DELETE FROM t1; DELETE FROM t1;
--echo --echo
LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v2 LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v2
FIELDS ESCAPED BY '\\' FIELDS ESCAPED BY '\\'
TERMINATED BY ',' TERMINATED BY ','
ENCLOSED BY '"' ENCLOSED BY '"'
...@@ -297,7 +297,7 @@ DELETE FROM t1; ...@@ -297,7 +297,7 @@ DELETE FROM t1;
--echo --echo
--error ER_LOAD_DATA_INVALID_COLUMN --error ER_LOAD_DATA_INVALID_COLUMN
LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v2 LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v2
FIELDS ESCAPED BY '\\' FIELDS ESCAPED BY '\\'
TERMINATED BY ',' TERMINATED BY ','
ENCLOSED BY '"' ENCLOSED BY '"'
...@@ -305,7 +305,7 @@ LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v2 ...@@ -305,7 +305,7 @@ LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v2
--echo --echo
--error ER_NON_UPDATABLE_TABLE --error ER_NON_UPDATABLE_TABLE
LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v3 LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v3
FIELDS ESCAPED BY '\\' FIELDS ESCAPED BY '\\'
TERMINATED BY ',' TERMINATED BY ','
ENCLOSED BY '"' ENCLOSED BY '"'
......
...@@ -1458,8 +1458,9 @@ CREATE TABLE t1 ( ...@@ -1458,8 +1458,9 @@ CREATE TABLE t1 (
KEY (c1), KEY (c1),
KEY (c2) KEY (c2)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR let $MYSQLD_DATADIR= `select @@datadir`;
--exec $MYISAMCHK -d $MYSQLTEST_VARDIR/master-data/test/t1 --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--exec $MYISAMCHK -d $MYSQLD_DATADIR/test/t1
DROP TABLE t1; DROP TABLE t1;
--echo End of 5.1 tests --echo End of 5.1 tests
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
# Bug 20770 Partitions: DATA DIRECTORY clause change in reorganize # Bug 20770 Partitions: DATA DIRECTORY clause change in reorganize
# doesn't remove old directory # doesn't remove old directory
let $MYSQLD_DATADIR= `select @@datadir`;
let $data_directory = DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp'; let $data_directory = DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp';
let $inx_directory = INDEX DIRECTORY = '$MYSQLTEST_VARDIR/tmp'; let $inx_directory = INDEX DIRECTORY = '$MYSQLTEST_VARDIR/tmp';
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
...@@ -23,12 +23,12 @@ subpartition by hash (a) ...@@ -23,12 +23,12 @@ subpartition by hash (a)
(SUBPARTITION subpart00, SUBPARTITION subpart01)); (SUBPARTITION subpart00, SUBPARTITION subpart01));
--echo # Checking if file exists before alter --echo # Checking if file exists before alter
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm --file_exists $MYSQLD_DATADIR/test/t1.frm
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par --file_exists $MYSQLD_DATADIR/test/t1.par
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYD --file_exists $MYSQLD_DATADIR/test/t1#P#p0#SP#subpart00.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYI --file_exists $MYSQLD_DATADIR/test/t1#P#p0#SP#subpart00.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYD --file_exists $MYSQLD_DATADIR/test/t1#P#p0#SP#subpart01.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYI --file_exists $MYSQLD_DATADIR/test/t1#P#p0#SP#subpart01.MYI
--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p0#SP#subpart00.MYD --file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p0#SP#subpart00.MYD
--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p0#SP#subpart01.MYD --file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p0#SP#subpart01.MYD
--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p0#SP#subpart00.MYI --file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p0#SP#subpart00.MYI
...@@ -42,16 +42,16 @@ eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO ...@@ -42,16 +42,16 @@ eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
(SUBPARTITION subpart20, SUBPARTITION subpart21)); (SUBPARTITION subpart20, SUBPARTITION subpart21));
--echo # Checking if file exists after alter --echo # Checking if file exists after alter
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm --file_exists $MYSQLD_DATADIR/test/t1.frm
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par --file_exists $MYSQLD_DATADIR/test/t1.par
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYD --file_exists $MYSQLD_DATADIR/test/t1#P#p1#SP#subpart10.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYI --file_exists $MYSQLD_DATADIR/test/t1#P#p1#SP#subpart10.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart11.MYD --file_exists $MYSQLD_DATADIR/test/t1#P#p1#SP#subpart11.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart11.MYI --file_exists $MYSQLD_DATADIR/test/t1#P#p1#SP#subpart11.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYD --file_exists $MYSQLD_DATADIR/test/t1#P#p2#SP#subpart20.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYI --file_exists $MYSQLD_DATADIR/test/t1#P#p2#SP#subpart20.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYD --file_exists $MYSQLD_DATADIR/test/t1#P#p2#SP#subpart21.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYI --file_exists $MYSQLD_DATADIR/test/t1#P#p2#SP#subpart21.MYI
--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p1#SP#subpart10.MYD --file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p1#SP#subpart10.MYD
--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p1#SP#subpart11.MYD --file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p1#SP#subpart11.MYD
--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p2#SP#subpart20.MYD --file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p2#SP#subpart20.MYD
...@@ -93,39 +93,43 @@ set @@sql_mode=@org_mode; ...@@ -93,39 +93,43 @@ set @@sql_mode=@org_mode;
# #
# Bug#32167: another privilege bypass with DATA/INDEX DIRECTORY # Bug#32167: another privilege bypass with DATA/INDEX DIRECTORY
# #
--replace_result $MYSQLTEST_VARDIR TEST_DIR
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--error ER_WRONG_ARGUMENTS --error ER_WRONG_ARGUMENTS
eval CREATE TABLE t1(a INT) eval CREATE TABLE t1(a INT)
PARTITION BY KEY (a) PARTITION BY KEY (a)
(PARTITION p0 DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'); (PARTITION p0 DATA DIRECTORY '$MYSQLD_DATADIR/test');
--replace_result $MYSQLTEST_VARDIR TEST_DIR
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--error ER_WRONG_ARGUMENTS --error ER_WRONG_ARGUMENTS
eval CREATE TABLE t1(a INT) eval CREATE TABLE t1(a INT)
PARTITION BY KEY (a) PARTITION BY KEY (a)
(PARTITION p0 INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'); (PARTITION p0 INDEX DIRECTORY '$MYSQLD_DATADIR/test');
--replace_result $MYSQLTEST_VARDIR TEST_DIR --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--error ER_WRONG_ARGUMENTS --error ER_WRONG_ARGUMENTS
eval CREATE TABLE ts (id INT, purchased DATE) eval CREATE TABLE ts (id INT, purchased DATE)
PARTITION BY RANGE(YEAR(purchased)) PARTITION BY RANGE(YEAR(purchased))
SUBPARTITION BY HASH(TO_DAYS(purchased)) ( SUBPARTITION BY HASH(TO_DAYS(purchased)) (
PARTITION p0 VALUES LESS THAN (1990) ( PARTITION p0 VALUES LESS THAN (1990) (
SUBPARTITION s0a SUBPARTITION s0a
DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test', DATA DIRECTORY = '$MYSQLD_DATADIR/test',
SUBPARTITION s0b SUBPARTITION s0b
DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test' DATA DIRECTORY = '$MYSQLD_DATADIR/test'
)); ));
--replace_result $MYSQLTEST_VARDIR TEST_DIR --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--error ER_WRONG_ARGUMENTS --error ER_WRONG_ARGUMENTS
eval CREATE TABLE ts (id INT, purchased DATE) eval CREATE TABLE ts (id INT, purchased DATE)
PARTITION BY RANGE(YEAR(purchased)) PARTITION BY RANGE(YEAR(purchased))
SUBPARTITION BY HASH(TO_DAYS(purchased)) ( SUBPARTITION BY HASH(TO_DAYS(purchased)) (
PARTITION p0 VALUES LESS THAN (1990) ( PARTITION p0 VALUES LESS THAN (1990) (
SUBPARTITION s0a SUBPARTITION s0a
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test', INDEX DIRECTORY = '$MYSQLD_DATADIR/test',
SUBPARTITION s0b SUBPARTITION s0b
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test' INDEX DIRECTORY = '$MYSQLD_DATADIR/test'
)); ));
# End Windows specific test failures. # End Windows specific test failures.
...@@ -165,21 +169,24 @@ INDEX DIRECTORY = '$MYSQLTEST_VARDIR/p2Index', ...@@ -165,21 +169,24 @@ INDEX DIRECTORY = '$MYSQLTEST_VARDIR/p2Index',
PARTITION p3 DATA DIRECTORY = '$MYSQLTEST_VARDIR/p3Data' PARTITION p3 DATA DIRECTORY = '$MYSQLTEST_VARDIR/p3Data'
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/p3Index' INDEX DIRECTORY = '$MYSQLTEST_VARDIR/p3Index'
); );
let $MYSQLD_DATADIR= `select @@datadir`;
--echo # Checking that MyISAM .MYD and .MYI are in test db and data/idx dir --echo # Checking that MyISAM .MYD and .MYI are in test db and data/idx dir
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p0.MYI --file_exists $MYSQLD_DATADIR/test/example#P#p0.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p0.MYD --file_exists $MYSQLD_DATADIR/test/example#P#p0.MYD
--file_exists $MYSQLTEST_VARDIR/p0Data/example#P#p0.MYD --file_exists $MYSQLTEST_VARDIR/p0Data/example#P#p0.MYD
--file_exists $MYSQLTEST_VARDIR/p0Index/example#P#p0.MYI --file_exists $MYSQLTEST_VARDIR/p0Index/example#P#p0.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p1.MYI --file_exists $MYSQLD_DATADIR/test/example#P#p1.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p1.MYD --file_exists $MYSQLD_DATADIR/test/example#P#p1.MYD
--file_exists $MYSQLTEST_VARDIR/p1Data/example#P#p1.MYD --file_exists $MYSQLTEST_VARDIR/p1Data/example#P#p1.MYD
--file_exists $MYSQLTEST_VARDIR/p1Index/example#P#p1.MYI --file_exists $MYSQLTEST_VARDIR/p1Index/example#P#p1.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p2.MYI --file_exists $MYSQLD_DATADIR/test/example#P#p2.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p2.MYD --file_exists $MYSQLD_DATADIR/test/example#P#p2.MYD
--file_exists $MYSQLTEST_VARDIR/p2Data/example#P#p2.MYD --file_exists $MYSQLTEST_VARDIR/p2Data/example#P#p2.MYD
--file_exists $MYSQLTEST_VARDIR/p2Index/example#P#p2.MYI --file_exists $MYSQLTEST_VARDIR/p2Index/example#P#p2.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p3.MYI --file_exists $MYSQLD_DATADIR/test/example#P#p3.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p3.MYD --file_exists $MYSQLD_DATADIR/test/example#P#p3.MYD
--file_exists $MYSQLTEST_VARDIR/p3Data/example#P#p3.MYD --file_exists $MYSQLTEST_VARDIR/p3Data/example#P#p3.MYD
--file_exists $MYSQLTEST_VARDIR/p3Index/example#P#p3.MYI --file_exists $MYSQLTEST_VARDIR/p3Index/example#P#p3.MYI
DROP TABLE example; DROP TABLE example;
......
...@@ -177,14 +177,15 @@ drop table t1; ...@@ -177,14 +177,15 @@ drop table t1;
# #
# Bug #29325: create table overwrites .MYD file of other table (datadir) # Bug #29325: create table overwrites .MYD file of other table (datadir)
# #
let $MYSQLD_DATADIR= `select @@datadir`;
SET SESSION keep_files_on_create = TRUE; SET SESSION keep_files_on_create = TRUE;
--write_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD --write_file $MYSQLD_DATADIR/test/t1.MYD
EOF EOF
--disable_abort_on_error --disable_abort_on_error
--error 1,1,ER_TABLE_EXISTS_ERROR --error 1,1,ER_TABLE_EXISTS_ERROR
CREATE TABLE t1 (a INT) ENGINE MYISAM; CREATE TABLE t1 (a INT) ENGINE MYISAM;
--error 0,1 --error 0,1
--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD; --remove_file $MYSQLD_DATADIR/test/t1.MYD;
--enable_abort_on_error --enable_abort_on_error
SET SESSION keep_files_on_create = FALSE; SET SESSION keep_files_on_create = FALSE;
CREATE TABLE t1 (a INT) ENGINE MYISAM; CREATE TABLE t1 (a INT) ENGINE MYISAM;
...@@ -195,22 +196,27 @@ DROP TABLE t1; ...@@ -195,22 +196,27 @@ DROP TABLE t1;
# #
# Bug#32167: another privilege bypass with DATA/INDEX DIRECTORY # Bug#32167: another privilege bypass with DATA/INDEX DIRECTORY
# #
--replace_result $MYSQLTEST_VARDIR TEST_DIR let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--error 1210 --error 1210
eval CREATE TABLE t1(a INT) eval CREATE TABLE t1(a INT)
INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql'; INDEX DIRECTORY='$MYSQLD_DATADIR/mysql';
--replace_result $MYSQLTEST_VARDIR TEST_DIR
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--error 1210 --error 1210
eval CREATE TABLE t1(a INT) eval CREATE TABLE t1(a INT)
DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/test'; DATA DIRECTORY='$MYSQLD_DATADIR/test';
--replace_result $MYSQLTEST_VARDIR TEST_DIR
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--error 1210 --error 1210
eval CREATE TABLE t1(a INT) eval CREATE TABLE t1(a INT)
DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/'; DATA DIRECTORY='$MYSQLD_DATADIR/';
--replace_result $MYSQLTEST_VARDIR TEST_DIR
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--error 1210 --error 1210
eval CREATE TABLE t1(a INT) eval CREATE TABLE t1(a INT)
INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data'; INDEX DIRECTORY='$MYSQLD_DATADIR';
--replace_result $MYSQLTEST_VARDIR TEST_DIR --replace_result $MYSQLTEST_VARDIR TEST_DIR
--error 1 --error 1
eval CREATE TABLE t1(a INT) eval CREATE TABLE t1(a INT)
...@@ -218,6 +224,7 @@ INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data_var'; ...@@ -218,6 +224,7 @@ INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data_var';
# BUG#25677 - With --skip-symbolic-links option on, DATA DIRECTORY clause is # BUG#25677 - With --skip-symbolic-links option on, DATA DIRECTORY clause is
# silently ignored # silently ignored
# #
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='NO_DIR_IN_CREATE'; SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='NO_DIR_IN_CREATE';
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp'; eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment