Commit 109ae607 authored by Bjorn Munch's avatar Bjorn Munch

Bug #46327 MTR2 prevents gcov data accumulation

mysqladmin fails on Linux in 6.0 without --character-sets-dir
Also added timeout for server shutdown, hope this will solve it
parent 861cf983
...@@ -738,6 +738,7 @@ sub run_worker ($) { ...@@ -738,6 +738,7 @@ sub run_worker ($) {
} }
elsif ($line eq 'BYE'){ elsif ($line eq 'BYE'){
mtr_report("Server said BYE"); mtr_report("Server said BYE");
stop_all_servers($opt_shutdown_timeout);
exit(0); exit(0);
} }
else { else {
...@@ -3435,14 +3436,14 @@ sub run_testcase ($) { ...@@ -3435,14 +3436,14 @@ sub run_testcase ($) {
my $check_res; my $check_res;
if ( restart_forced_by_test() ) if ( restart_forced_by_test() )
{ {
stop_all_servers(); stop_all_servers($opt_shutdown_timeout);
} }
elsif ( $opt_check_testcases and elsif ( $opt_check_testcases and
$check_res= check_testcase($tinfo, "after")) $check_res= check_testcase($tinfo, "after"))
{ {
if ($check_res == 1) { if ($check_res == 1) {
# Test case had sideeffects, not fatal error, just continue # Test case had sideeffects, not fatal error, just continue
stop_all_servers(); stop_all_servers($opt_shutdown_timeout);
mtr_report("Resuming tests...\n"); mtr_report("Resuming tests...\n");
} }
else { else {
...@@ -4083,6 +4084,7 @@ sub mysqld_stop { ...@@ -4083,6 +4084,7 @@ sub mysqld_stop {
mtr_init_args(\$args); mtr_init_args(\$args);
mtr_add_arg($args, "--no-defaults"); mtr_add_arg($args, "--no-defaults");
mtr_add_arg($args, "--character-sets-dir=%s", $mysqld->value('character-sets-dir'));
mtr_add_arg($args, "--user=%s", $opt_user); mtr_add_arg($args, "--user=%s", $opt_user);
mtr_add_arg($args, "--password="); mtr_add_arg($args, "--password=");
mtr_add_arg($args, "--port=%d", $mysqld->value('port')); mtr_add_arg($args, "--port=%d", $mysqld->value('port'));
...@@ -4286,11 +4288,12 @@ sub mysqld_start ($$) { ...@@ -4286,11 +4288,12 @@ sub mysqld_start ($$) {
sub stop_all_servers () { sub stop_all_servers () {
my $shutdown_timeout = $_[0] or 0;
mtr_verbose("Stopping all servers..."); mtr_verbose("Stopping all servers...");
# Kill all started servers # Kill all started servers
My::SafeProcess::shutdown(0, # shutdown timeout 0 => kill My::SafeProcess::shutdown($shutdown_timeout,
started(all_servers())); started(all_servers()));
# Remove pidfiles # Remove pidfiles
......
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