Commit 72b828fa authored by Bjorn Munch's avatar Bjorn Munch

upmerge 59063

parents 14085ea1 a32b2699
...@@ -4220,8 +4220,10 @@ sub check_expected_crash_and_restart { ...@@ -4220,8 +4220,10 @@ sub check_expected_crash_and_restart {
{ {
mtr_verbose("Crash was expected, file '$expect_file' exists"); 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" # If last line in expect file starts with "wait"
# sleep a little and try again, thus allowing the # sleep a little and try again, thus allowing the
# test script to control when the server should start # test script to control when the server should start
...@@ -4230,10 +4232,11 @@ sub check_expected_crash_and_restart { ...@@ -4230,10 +4232,11 @@ sub check_expected_crash_and_restart {
if ($last_line =~ /^wait/ ) if ($last_line =~ /^wait/ )
{ {
mtr_verbose("Test says wait before restart") if $waits == 0; mtr_verbose("Test says wait before restart") if $waits == 0;
mtr_milli_sleep(100);
next; 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 # If last line begins "restart:", the rest of the line is read as
# extra command line options to add to the restarted mysqld. # extra command line options to add to the restarted mysqld.
# Anything other than 'wait' or 'restart:' (with a colon) will # Anything other than 'wait' or 'restart:' (with a colon) will
...@@ -4617,6 +4620,8 @@ sub mysqld_start ($$) { ...@@ -4617,6 +4620,8 @@ sub mysqld_start ($$) {
my @all_opts= @$extra_opts; my @all_opts= @$extra_opts;
if (exists $mysqld->{'restart_opts'}) { if (exists $mysqld->{'restart_opts'}) {
push (@all_opts, @{$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); mysqld_arguments($args,$mysqld,\@all_opts);
......
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