Commit 081a3726 authored by Luis Soares's avatar Luis Soares

BUG#50473: rpl_sync fails on windows debug enabled binaries

The test case was failing because it contained instructions
to close/reopen files, when they were in use. This raises
problems in windows. Example of such instruction:

---exec echo "failure" > $MYSQLD_SLAVE_DATADIR/$file

The test also contains commands that are not platform 
agnostic. Example:

--exec cat $MYSQLD_SLAVE_DATADIR/master.backup > \
           $MYSQLD_SLAVE_DATADIR/master.info

We fix this by just truncating the necessary file and write
"failure" into it (ie, without closing the file). The
platform specific instruction is removed from the test
case as it seems redundant.
parent a6165acc
......@@ -64,8 +64,15 @@ stop slave IO_THREAD;
source include/wait_for_slave_io_to_stop.inc;
let $file= query_get_value("SHOW SLAVE STATUS", Relay_Log_File, 1);
--replace_result $MYSQLD_SLAVE_DATADIR MYSQLD_SLAVE_DATADIR
--exec echo "failure" > $MYSQLD_SLAVE_DATADIR/$file
--let FILE_TO_CORRUPT= $MYSQLD_SLAVE_DATADIR/$file
perl;
$file= $ENV{'FILE_TO_CORRUPT'};
open(FILE, ">$file") || die "Unable to open $file.";
truncate(FILE,0);
print FILE "failure";
close ($file);
EOF
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
SET SESSION debug="d,crash_before_rotate_relaylog";
......@@ -102,9 +109,6 @@ insert into t1(a) values(8);
insert into t1(a) values(9);
connection slave;
--replace_result $MYSQLD_SLAVE_DATADIR MYSQLD_SLAVE_DATADIR
--exec cat $MYSQLD_SLAVE_DATADIR/master.backup > $MYSQLD_SLAVE_DATADIR/master.info
let MYSQLD_SLAVE_DATADIR=`select @@datadir`;
--perl
......
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