Fix paths MYSQLTEST_VARDIR/master-data -> MYSQLD_DATADIR

parent 17a5ef39
...@@ -21,15 +21,19 @@ if ($no_debug) ...@@ -21,15 +21,19 @@ if ($no_debug)
--disable_query_log --disable_query_log
} }
# Get the MySQL Servers datadir without ending slash
let $MYSQLD_DATADIR= `select LEFT(@@datadir, LENGTH(@@datadir)-1)`;
#echo MYSQLD_DATADIR: $MYSQLD_DATADIR;
if ($do_file_tests) if ($do_file_tests)
{ {
# List the files belonging to the table t1 # List the files belonging to the table t1
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $MYSQLTEST_VARDIR/master-data/test/tmp2 || true --exec ls $MYSQLD_DATADIR/test/t1* > $MYSQLD_DATADIR/test/tmp2 || true
if ($with_directories) if ($with_directories)
{ {
--exec ls $MYSQLTEST_VARDIR/tmp/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 || true --exec ls $MYSQLTEST_VARDIR/tmp/t1* >> $MYSQLD_DATADIR/test/tmp2 || true
} }
eval SET @aux = CONCAT('load_file(''$MYSQLTEST_VARDIR','/master-data/test/tmp2'')'); eval SET @aux = CONCAT('load_file(''$MYSQLD_DATADIR','/test/tmp2'')');
let $file_list= `SELECT @aux`; let $file_list= `SELECT @aux`;
} }
if (!$do_file_tests) if (!$do_file_tests)
...@@ -61,7 +65,7 @@ if ($found_garbage) ...@@ -61,7 +65,7 @@ if ($found_garbage)
} }
# Do a manual cleanup, because the following tests should not suffer from # Do a manual cleanup, because the following tests should not suffer from
# remaining files # remaining files
--exec rm -f $MYSQLTEST_VARDIR/master-data/test/t1* || true --exec rm -f $MYSQLD_DATADIR/test/t1* || true
if ($with_directories) if ($with_directories)
{ {
--exec rm -f $MYSQLTEST_VARDIR/tmp/t1* || true --exec rm -f $MYSQLTEST_VARDIR/tmp/t1* || true
......
...@@ -9,6 +9,7 @@ eval SHOW CREATE TABLE t1; ...@@ -9,6 +9,7 @@ eval SHOW CREATE TABLE t1;
# listing of files belonging to the table t1 # listing of files belonging to the table t1
if ($ls) if ($ls)
{ {
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR let $MYSQLD_DATADIR= `select @@datadir`;
--exec ls $MYSQLTEST_VARDIR/mysqld.1/data/test/t1* --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--exec ls $MYSQLD_DATADIR/test/t1*
} }
...@@ -25,23 +25,27 @@ if ($no_debug) ...@@ -25,23 +25,27 @@ if ($no_debug)
# Clean the table holding the definition of t1 # Clean the table holding the definition of t1
DELETE FROM t0_definition; DELETE FROM t0_definition;
# Get the MySQL Servers datadir without ending slash
let $MYSQLD_DATADIR= `select LEFT(@@datadir, LENGTH(@@datadir)-1)`;
#echo MYSQLD_DATADIR: $MYSQLD_DATADIR;
# Dump the current definition of the table t1 to tmp1 # Dump the current definition of the table t1 to tmp1
# This complicated method - let another mysqltest collect the output - is used # This complicated method - let another mysqltest collect the output - is used
# because of two reasons # because of two reasons
# - SHOW CREATE TABLE t1 is at least currently most probably more reliable than # - SHOW CREATE TABLE t1 is at least currently most probably more reliable than
# the corresponding SELECT on the INFORMATION_SCHEMA # the corresponding SELECT on the INFORMATION_SCHEMA
# - SHOW CREATE TABLE .. cannot write its out put into a file like SELECT # - SHOW CREATE TABLE .. cannot write its out put into a file like SELECT
--exec echo "SHOW CREATE TABLE t1;" | $MYSQL_TEST > $MYSQLTEST_VARDIR/master-data/test/tmp1 2>&1 || true --exec echo "SHOW CREATE TABLE t1;" | $MYSQL_TEST > $MYSQLD_DATADIR/test/tmp1 2>&1 || true
if ($do_file_tests) if ($do_file_tests)
{ {
# List the files belonging to the table t1 # List the files belonging to the table t1
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true --exec ls $MYSQLD_DATADIR/test/t1* > $MYSQLD_DATADIR/test/tmp2 2>&1 || true
if ($with_directories) if ($with_directories)
{ {
--exec ls $MYSQLTEST_VARDIR/mysql-test-data-dir/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true --exec ls $MYSQLTEST_VARDIR/mysql-test-data-dir/t1* >> $MYSQLD_DATADIR/test/tmp2 2>&1 || true
--exec ls $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true --exec ls $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1* >> $MYSQLD_DATADIR/test/tmp2 2>&1 || true
} }
eval SET @aux = CONCAT('load_file(''$MYSQLTEST_VARDIR','/master-data/test/tmp2'' eval SET @aux = CONCAT('load_file(''$MYSQLD_DATADIR','/test/tmp2''
)'); )');
let $file_list= `SELECT @aux`; let $file_list= `SELECT @aux`;
} }
...@@ -52,7 +56,7 @@ let $file_list= '--- not determined ---'; ...@@ -52,7 +56,7 @@ let $file_list= '--- not determined ---';
# Insert the current definition of the table t1 into t0_definition # Insert the current definition of the table t1 into t0_definition
eval INSERT INTO t0_definition SET state = 'old', eval INSERT INTO t0_definition SET state = 'old',
create_command = load_file('$MYSQLTEST_VARDIR/master-data/test/tmp1'), create_command = load_file('$MYSQLD_DATADIR/test/tmp1'),
file_list = $file_list; file_list = $file_list;
# Print the create table statement into the protocol # Print the create table statement into the protocol
...@@ -64,9 +68,9 @@ if ($do_file_tests) ...@@ -64,9 +68,9 @@ if ($do_file_tests)
if ($ls) if ($ls)
{ {
# Print the list of files into the protocol # Print the list of files into the protocol
eval SELECT REPLACE(file_list,'$MYSQLTEST_VARDIR','\$MYSQLTEST_VARDIR') replace_result $MYSQLD_DATADIR MYSQLD_DATADIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR;
AS "unified filelist" SELECT file_list AS "unified filelist"
FROM t0_definition WHERE state = 'old'; FROM t0_definition WHERE state = 'old';
} }
} }
--enable_query_log --enable_query_log
...@@ -26,18 +26,23 @@ if ($no_debug) ...@@ -26,18 +26,23 @@ if ($no_debug)
# Clean the table holding the definition of t1 # Clean the table holding the definition of t1
DELETE FROM t0_definition WHERE state = 'new'; DELETE FROM t0_definition WHERE state = 'new';
# Get the MySQL Servers datadir without ending slash
let $MYSQLD_DATADIR= `select LEFT(@@datadir, LENGTH(@@datadir)-1)`;
#echo MYSQLD_DATADIR: $MYSQLD_DATADIR;
# Dump the current definition of the table t1 to tmp1 # Dump the current definition of the table t1 to tmp1
--exec echo "SHOW CREATE TABLE t1;" | $MYSQL_TEST > $MYSQLTEST_VARDIR/master-data/test/tmp1 2>&1 || true --exec echo "SHOW CREATE TABLE t1;" | $MYSQL_TEST > $MYSQLD_DATADIR/test/tmp1 2>&1 || true
if ($do_file_tests) if ($do_file_tests)
{ {
# List the files belonging to the table t1 # List the files belonging to the table t1
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true --exec ls $MYSQLD_DATADIR/test/t1* > $MYSQLD_DATADIR/test/tmp2 2>&1 || true
if ($with_directories) if ($with_directories)
{ {
--exec ls $MYSQLTEST_VARDIR/mysql-test-data-dir/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true --exec ls $MYSQLTEST_VARDIR/mysql-test-data-dir/t1* >> $MYSQLD_DATADIR/test/tmp2 2>&1 || true
--exec ls $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true --exec ls $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1* >> $MYSQLD_DATADIR/test/tmp2 2>&1 || true
} }
eval SET @aux = CONCAT('load_file(''$MYSQLTEST_VARDIR','/master-data/test/tmp2'')'); eval SET @aux = CONCAT('load_file(''$MYSQLD_DATADIR','/test/tmp2'')');
let $file_list= `SELECT @aux`; let $file_list= `SELECT @aux`;
} }
if (!$do_file_tests) if (!$do_file_tests)
...@@ -47,7 +52,7 @@ let $file_list= '--- not determined ---'; ...@@ -47,7 +52,7 @@ let $file_list= '--- not determined ---';
# Insert the current definition of the table t1 into t0_definition # Insert the current definition of the table t1 into t0_definition
eval INSERT INTO t0_definition SET state = 'new', eval INSERT INTO t0_definition SET state = 'new',
create_command = load_file('$MYSQLTEST_VARDIR/master-data/test/tmp1'), create_command = load_file('$MYSQLD_DATADIR/test/tmp1'),
file_list = $file_list; file_list = $file_list;
# Print the old and new table layout, if they differ # Print the old and new table layout, if they differ
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
--enable_warnings --enable_warnings
let $MYSQLD_DATADIR= `select @@datadir`;
--mkdir $MYSQLTEST_VARDIR/mysql-test-data-dir --mkdir $MYSQLTEST_VARDIR/mysql-test-data-dir
--mkdir $MYSQLTEST_VARDIR/mysql-test-idx-dir --mkdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
...@@ -49,17 +52,17 @@ PARTITION BY HASH (c1) ...@@ -49,17 +52,17 @@ PARTITION BY HASH (c1)
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir' INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir'
); );
--echo # Verifying .frm and .par files --echo # Verifying .frm and .par files
--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
--echo # Verifying that there are no MyISAM files --echo # Verifying that there are no MyISAM files
--error 1 --error 1
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD --file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD
--error 1 --error 1
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI --file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI
--error 1 --error 1
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD --file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYD
--error 1 --error 1
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI --file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYI
--error 1 --error 1
--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD --file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD
--error 1 --error 1
...@@ -73,12 +76,12 @@ FLUSH TABLES; ...@@ -73,12 +76,12 @@ FLUSH TABLES;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
ALTER TABLE t1 ENGINE = MyISAM; ALTER TABLE t1 ENGINE = MyISAM;
--echo # Verifying .frm, .par and MyISAM files (.MYD, MYI) --echo # Verifying .frm, .par and MyISAM files (.MYD, MYI)
--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.MYD --file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI --file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD --file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI --file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYI
--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD --file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD
--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.MYI --file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.MYI
--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD --file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD
......
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