summaryrefslogtreecommitdiff
path: root/mysql-test/t/symlink.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/symlink.test')
-rw-r--r--mysql-test/t/symlink.test23
1 files changed, 13 insertions, 10 deletions
diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test
index b13640e7f3b..c805dd40fe8 100644
--- a/mysql-test/t/symlink.test
+++ b/mysql-test/t/symlink.test
@@ -176,14 +176,15 @@ drop table t1;
#
# Bug #29325: create table overwrites .MYD file of other table (datadir)
#
+let $MYSQLD_DATADIR= `select @@datadir`;
SET SESSION keep_files_on_create = TRUE;
---write_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD
+--write_file $MYSQLD_DATADIR/test/t1.MYD
EOF
--disable_abort_on_error
--error 1,1,ER_TABLE_EXISTS_ERROR
CREATE TABLE t1 (a INT) ENGINE MYISAM;
--error 0,1
---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD;
+--remove_file $MYSQLD_DATADIR/test/t1.MYD;
--enable_abort_on_error
SET SESSION keep_files_on_create = FALSE;
CREATE TABLE t1 (a INT) ENGINE MYISAM;
@@ -199,34 +200,35 @@ DROP TABLE t1;
# home directory is symlinked, e.g. mysql-test-run --mem.
# This will be fixed in 6.0 only.
#
---replace_result $MYSQLTEST_VARDIR TEST_DIR
+let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--error 0,ER_WRONG_ARGUMENTS
eval CREATE TABLE t1(a INT)
-INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql';
+INDEX DIRECTORY='$MYSQLD_DATADIR/mysql';
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
#
---replace_result $MYSQLTEST_VARDIR TEST_DIR
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--error 0,ER_WRONG_ARGUMENTS
eval CREATE TABLE t1(a INT)
-DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/test';
+DATA DIRECTORY='$MYSQLD_DATADIR/test';
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
#
---replace_result $MYSQLTEST_VARDIR TEST_DIR
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--error 0,ER_WRONG_ARGUMENTS
eval CREATE TABLE t1(a INT)
-DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/';
+DATA DIRECTORY='$MYSQLD_DATADIR/';
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
#
---replace_result $MYSQLTEST_VARDIR TEST_DIR
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--error 0,ER_WRONG_ARGUMENTS
eval CREATE TABLE t1(a INT)
-INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data';
+INDEX DIRECTORY='$MYSQLD_DATADIR';
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
@@ -240,6 +242,7 @@ INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data_var';
# BUG#25677 - With --skip-symbolic-links option on, DATA DIRECTORY clause is
# silently ignored
#
+
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='NO_DIR_IN_CREATE';
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp';