summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test
diff options
context:
space:
mode:
authorunknown <Dao-Gang.Qu@sun.com>2009-11-28 12:43:16 +0800
committerunknown <Dao-Gang.Qu@sun.com>2009-11-28 12:43:16 +0800
commitb9f9fe2e1a8ce599140d38cfd8f7d58b5344e36e (patch)
tree71d9102cc17d9bf776e91efe22bac9613970c2d9 /mysql-test/suite/rpl/t/rpl_loaddata_symlink.test
parentc256e3ab29be7cf1bc2a23c652466c4feb4ded98 (diff)
downloadmariadb-git-b9f9fe2e1a8ce599140d38cfd8f7d58b5344e36e.tar.gz
Bug #43913 rpl_cross_version can't pass on conflicts complainig clash with --slave-load-tm
The 'slave_patternload_file' is assigned to the real path of the load data file when initializing the object of Relay_log_info. But the path of the load data file is not formatted to real path when executing event from relay log. So the error will be encountered if the path of the load data file is a symbolic link. Actually the global 'opt_secure_file_priv' is not formatted to real path when loading data from file. So the same thing will happen too. To fix these errors, the path of the load data file should be formatted to real path when executing event from relay log. And the 'opt_secure_file_priv' should be formatted to real path when loading data infile. mysql-test/suite/rpl/r/rpl_loaddata_symlink.result: Test result for bug#43913. mysql-test/suite/rpl/t/rpl_loaddata_symlink-master.sh: Added the test file to create a link from $MYSQLTEST_VARDIR/std_data to $MYSQLTEST_VARDIR/std_data_master_link mysql-test/suite/rpl/t/rpl_loaddata_symlink-slave.sh: Added the test file to create a link from $MYSQLTEST_VARDIR/std_data to $MYSQLTEST_VARDIR/std_data_slave_link mysql-test/suite/rpl/t/rpl_loaddata_symlink.test: Added the test file to verify if loading data infile will work fine if the path of the load data file is a symbolic link. sql/rpl_rli.cc: Added call 'my_realpath' function for avoiding sometimes the 'fn_format' function can't format real path rightly.
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_loaddata_symlink.test')
-rw-r--r--mysql-test/suite/rpl/t/rpl_loaddata_symlink.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test b/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test
new file mode 100644
index 00000000000..d3ee2766314
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test
@@ -0,0 +1,20 @@
+#
+# BUG#43913
+# This test verifies if loading data infile will work fine
+# if the path of the load data file is a symbolic link.
+#
+--source include/master-slave.inc
+--source include/have_binlog_format_statement.inc
+
+create table t1(a int not null auto_increment, b int, primary key(a) );
+load data infile '../../std_data/rpl_loaddata.dat' into table t1;
+select * from t1;
+
+sync_slave_with_master;
+connection slave;
+select * from t1;
+
+connection master;
+drop table t1;
+sync_slave_with_master;
+