2975 Bjorn Munch 2011-01-21
Bug #59063 rpl_migration_crash_safe fails on Windows
Race condition may occur: mtr sees the .expect file but it's empty
Fix: wait and try again if file is empty
Addendum: try again if line isn't 'wait' or 'restart'
Also added verbose printout of extra restart options
modified:
mysql-test/mysql-test-run.pl
2974 Bjorn Munch 2011-01-19 [merge]
merge from 5.1 main
added:
mysql-test/include/restart_slave_sql.inc
mysql-test/include/rpl_connection_master.inc
mysql-test/include/rpl_connection_slave.inc
mysql-test/include/rpl_connection_slave1.inc
modified:
mysql-test/r/ctype_many.result
mysql-test/r/func_like.result
mysql-test/r/xml.result
mysql-test/suite/rpl/r/rpl_stop_slave.result
mysql-test/suite/rpl/t/rpl_packet.test
mysql-test/suite/rpl/t/rpl_stop_slave.test
mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
mysql-test/t/ctype_many.test
mysql-test/t/func_like.test
mysql-test/t/xml.test
sql/item_strfunc.cc
sql/item_strfunc.h
sql/item_sum.h
sql/slave.cc
sql/sql_repl.cc
strings/xml.c
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2011-01-18 10:03:44 +0000
+++ b/mysql-test/mysql-test-run.pl 2011-01-21 12:57:21 +0000
@@ -4093,8 +4093,10 @@ sub check_expected_crash_and_restart {
{
mtr_verbose("Crash was expected, file '$expect_file' exists");
- for (my $waits = 0; $waits < 50; $waits++)
+ for (my $waits = 0; $waits < 50; mtr_milli_sleep(100), $waits++)
{
+ # Race condition seen on Windows: try again until file not empty
+ next if -z $expect_file;
# If last line in expect file starts with "wait"
# sleep a little and try again, thus allowing the
# test script to control when the server should start
@@ -4103,10 +4105,11 @@ sub check_expected_crash_and_restart {
if ($last_line =~ /^wait/ )
{
mtr_verbose("Test says wait before restart") if $waits == 0;
- mtr_milli_sleep(100);
next;
}
+ # Ignore any partial or unknown command
+ next unless $last_line =~ /^restart/;
# If last line begins "restart:", the rest of the line is read as
# extra command line options to add to the restarted mysqld.
# Anything other than 'wait' or 'restart:' (with a colon) will
@@ -4471,6 +4474,8 @@ sub mysqld_start ($$) {
my @all_opts= @$extra_opts;
if (exists $mysqld->{'restart_opts'}) {
push (@all_opts, @{$mysqld->{'restart_opts'}});
+ mtr_verbose(My::Options::toStr("mysqld_start restart",
+ @{$mysqld->{'restart_opts'}}));
}
mysqld_arguments($args,$mysqld,\@all_opts);
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-mtr branch (bjorn.munch:2974 to 2975) Bug#59063 | Bjorn Munch | 21 Jan |