summaryrefslogtreecommitdiff
path: root/mysql-test/t/rpl_rotate_logs.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/rpl_rotate_logs.test')
-rw-r--r--mysql-test/t/rpl_rotate_logs.test8
1 files changed, 5 insertions, 3 deletions
diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test
index 0c5ed1a35a4..027747665a3 100644
--- a/mysql-test/t/rpl_rotate_logs.test
+++ b/mysql-test/t/rpl_rotate_logs.test
@@ -20,8 +20,10 @@ connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
drop table if exists t1, t2, t3, t4;
--enable_warnings
connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
-system cat /dev/null > $MYSQLTEST_VARDIR/slave-data/master.info;
-system chmod 000 $MYSQLTEST_VARDIR/slave-data/master.info;
+# Create empty file
+write_file $MYSQLTEST_VARDIR/slave-data/master.info;
+EOF
+chmod 0000 $MYSQLTEST_VARDIR/slave-data/master.info;
connection slave;
--disable_warnings
drop table if exists t1, t2, t3, t4;
@@ -32,7 +34,7 @@ drop table if exists t1, t2, t3, t4;
--replace_result $MYSQL_TEST_DIR TESTDIR
--error 1105,1105,29
start slave;
-system chmod 600 $MYSQLTEST_VARDIR/slave-data/master.info;
+chmod 0600 $MYSQLTEST_VARDIR/slave-data/master.info;
# It will fail again because the file is empty so the slave cannot get valuable
# info about how to connect to the master from it (failure in
# init_strvar_from_file() in init_master_info()).