Commit 9e549aef authored by unknown's avatar unknown

Fix paths MYSQLTEST_VARDIR/master-data -> MYSQLD_DATADIR

parent f361b632
......@@ -21,15 +21,19 @@ if ($no_debug)
--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)
{
# 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)
{
--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`;
}
if (!$do_file_tests)
......@@ -61,7 +65,7 @@ if ($found_garbage)
}
# Do a manual cleanup, because the following tests should not suffer from
# remaining files
--exec rm -f $MYSQLTEST_VARDIR/master-data/test/t1* || true
--exec rm -f $MYSQLD_DATADIR/test/t1* || true
if ($with_directories)
{
--exec rm -f $MYSQLTEST_VARDIR/tmp/t1* || true
......
......@@ -9,6 +9,7 @@ eval SHOW CREATE TABLE t1;
# listing of files belonging to the table t1
if ($ls)
{
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec ls $MYSQLTEST_VARDIR/mysqld.1/data/test/t1*
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--exec ls $MYSQLD_DATADIR/test/t1*
}
......@@ -25,23 +25,27 @@ if ($no_debug)
# Clean the table holding the definition of t1
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
# This complicated method - let another mysqltest collect the output - is used
# because of two reasons
# - SHOW CREATE TABLE t1 is at least currently most probably more reliable than
# the corresponding SELECT on the INFORMATION_SCHEMA
# - 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)
{
# 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)
{
--exec ls $MYSQLTEST_VARDIR/mysql-test-data-dir/t1* >> $MYSQLTEST_VARDIR/master-data/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-data-dir/t1* >> $MYSQLD_DATADIR/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`;
}
......@@ -52,7 +56,7 @@ let $file_list= '--- not determined ---';
# Insert the current definition of the table t1 into t0_definition
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;
# Print the create table statement into the protocol
......@@ -64,8 +68,8 @@ if ($do_file_tests)
if ($ls)
{
# Print the list of files into the protocol
eval SELECT REPLACE(file_list,'$MYSQLTEST_VARDIR','\$MYSQLTEST_VARDIR')
AS "unified filelist"
replace_result $MYSQLD_DATADIR MYSQLD_DATADIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR;
SELECT file_list AS "unified filelist"
FROM t0_definition WHERE state = 'old';
}
}
......
......@@ -26,18 +26,23 @@ if ($no_debug)
# Clean the table holding the definition of t1
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
--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)
{
# 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)
{
--exec ls $MYSQLTEST_VARDIR/mysql-test-data-dir/t1* >> $MYSQLTEST_VARDIR/master-data/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-data-dir/t1* >> $MYSQLD_DATADIR/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`;
}
if (!$do_file_tests)
......@@ -47,7 +52,7 @@ let $file_list= '--- not determined ---';
# Insert the current definition of the table t1 into t0_definition
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;
# 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 @@
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
let $MYSQLD_DATADIR= `select @@datadir`;
--mkdir $MYSQLTEST_VARDIR/mysql-test-data-dir
--mkdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
......@@ -49,17 +52,17 @@ PARTITION BY HASH (c1)
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir'
);
--echo # Verifying .frm and .par files
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
--file_exists $MYSQLD_DATADIR/test/t1.frm
--file_exists $MYSQLD_DATADIR/test/t1.par
--echo # Verifying that there are no MyISAM files
--error 1
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
--file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD
--error 1
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
--file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI
--error 1
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD
--file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYD
--error 1
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI
--file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYI
--error 1
--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD
--error 1
......@@ -73,12 +76,12 @@ FLUSH TABLES;
SHOW CREATE TABLE t1;
ALTER TABLE t1 ENGINE = MyISAM;
--echo # Verifying .frm, .par and MyISAM files (.MYD, MYI)
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI
--file_exists $MYSQLD_DATADIR/test/t1.frm
--file_exists $MYSQLD_DATADIR/test/t1.par
--file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD
--file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI
--file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYD
--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-idx-dir/t1#P#p0.MYI
--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