diff --git a/mysql-test/include/restart_mysqld.inc b/mysql-test/include/restart_mysqld.inc index 689f3b8cc1f..9abd2b66131 100644 --- a/mysql-test/include/restart_mysqld.inc +++ b/mysql-test/include/restart_mysqld.inc @@ -8,3 +8,8 @@ --source include/shutdown_mysqld.inc --source include/start_mysqld.inc + +# The following sleep is required to give sleep_until_file_created() time +# to notice that the server was restarted. sleep_until_file_created() would +# fail if the server was restarted or killed at once after restart. +--sleep 0.1 diff --git a/mysql-test/include/wait_until_connected_again.inc b/mysql-test/include/wait_until_connected_again.inc index ecba08f199f..44b7fdb8e6b 100644 --- a/mysql-test/include/wait_until_connected_again.inc +++ b/mysql-test/include/wait_until_connected_again.inc @@ -33,7 +33,10 @@ while ($mysql_errno) { let $mysql_errno=0; } - --sleep 0.1 + if ($mysql_errno > 0) + { + --sleep 0.1 + } } --enable_query_log --enable_result_log diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index cee9f2b6ed6..7cadc5488a0 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -107,10 +107,10 @@ sub sleep_until_file_created ($$$$) { my $timeout= shift; my $proc= shift; my $warn_seconds = shift; - my $sleeptime= 100; # Milliseconds - my $loops= ($timeout * 1000) / $sleeptime; + my $sleeptime= 10; # Milliseconds + my $loops= ($timeout * 10000) / $sleeptime; - for ( my $loop= 1; $loop <= $loops; $loop++ ) + for ( my $loop= 0; $loop <= $loops; $loop++ ) { if ( -r $pidfile ) {