BUG#59063: rpl_migration_crash_safe fails on Windows
Backported the fix to 5.1. Problem: the auxiliary test files rpl_start_server.inc and rpl_stop_server.inc write a file that is later read by mtr. The bug was that the file was written with platform-dependent newline terminators, i.e., \r\n on windows, whereas mtr only understands \n. Fix: write the file so that it uses \n on all platforms. mysql-test/include/rpl_start_server.inc: Force test to use \n instead of platform-dependent newline terminator. mysql-test/include/rpl_stop_server.inc: Force test to use \n instead of platform-dependent newline terminator.
This commit is contained in:
parent
06e21d5cd9
commit
faafae781a
@ -45,7 +45,15 @@ if ($rpl_server_parameters)
|
|||||||
--source include/rpl_connection.inc
|
--source include/rpl_connection.inc
|
||||||
|
|
||||||
# Write file to make mysql-test-run.pl start up the server again
|
# Write file to make mysql-test-run.pl start up the server again
|
||||||
--exec echo "$_rpl_start_server_command" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
--let WRITE_TO_FILE= $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||||
|
--let WRITE_TO_VAR= $_rpl_start_server_command
|
||||||
|
perl;
|
||||||
|
my $file= $ENV{'WRITE_TO_FILE'};
|
||||||
|
my $var= $ENV{'WRITE_TO_VAR'};
|
||||||
|
open WRITE_FILE, ">> $file" or die "Error opening $file: $!";
|
||||||
|
print WRITE_FILE $var, "\n" or die "Error appending to $file: $!";
|
||||||
|
close WRITE_FILE or die "Error closing $file: $!";
|
||||||
|
EOF
|
||||||
|
|
||||||
--source include/rpl_reconnect.inc
|
--source include/rpl_reconnect.inc
|
||||||
|
|
||||||
|
@ -44,7 +44,9 @@ if ($rpl_debug)
|
|||||||
|
|
||||||
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
||||||
# it until it's told to
|
# it until it's told to
|
||||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||||
|
wait
|
||||||
|
EOF
|
||||||
|
|
||||||
# Send shutdown to the connected server and give
|
# Send shutdown to the connected server and give
|
||||||
# it 10 seconds to die before zapping it
|
# it 10 seconds to die before zapping it
|
||||||
|
Loading…
x
Reference in New Issue
Block a user