MDEV-26972 MTR worker aborts after server restart failure

restore the old behavior where without a debugger mtr does not
wait for mysqld to start. It was broken in feacc0aaf2
This commit is contained in:
Sergei Golubchik 2021-11-26 17:15:41 +01:00
parent a96b428269
commit f5441ef4da

View File

@ -5072,6 +5072,7 @@ sub mysqld_start ($$) {
# Differs from "generic" MYSQLD_CMD by including all command line
# options from *.opt and *.combination files.
$ENV{'MYSQLD_LAST_CMD'}= "$exe @$args";
my $oldexe= $exe;
My::Debugger::setup_args(\$args, \$exe, $mysqld->name());
$ENV{'VALGRIND_TEST'}= $opt_valgrind = int(($exe || '') eq 'valgrind');
@ -5127,8 +5128,9 @@ sub mysqld_start ($$) {
$mysqld->{'started_opts'}= $extra_opts;
my $expect_file= "$opt_vardir/tmp/".$mysqld->name().".expect";
return sleep_until_file_created($mysqld->value('pid-file'), $expect_file,
$opt_start_timeout, $mysqld->{'proc'}, $warn_seconds);
return $oldexe eq $exe ||
sleep_until_file_created($mysqld->value('pid-file'), $expect_file,
$opt_start_timeout, $mysqld->{'proc'}, $warn_seconds);
}