-
unknown authored
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.
b9f9fe2e