1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge mysql.com:/home/jimw/my/mysql-5.0-clean

into  mysql.com:/home/jimw/my/mysql-5.1-clean
This commit is contained in:
jimw@mysql.com
2006-04-30 13:27:38 -07:00
152 changed files with 11423 additions and 1564 deletions

View File

@ -674,10 +674,12 @@ sub mtr_mysqladmin_shutdown {
mtr_add_arg($args, "shutdown");
# Start mysqladmin in paralell and wait for termination later
my $pid= mtr_spawn($::exe_mysqladmin, $args,
"", $::path_manager_log, $::path_manager_log, "",
"", $path_mysqladmin_log, $path_mysqladmin_log, "",
{ append_log_file => 1 });
# Save the pid of the mysqladmin process
$mysql_admin_pids{$pid}= 1;
# We don't wait for termination of mysqladmin
}
# Wait for all the started mysqladmin to exit
@ -720,8 +722,6 @@ sub mtr_mysqladmin_shutdown {
$timeout or mtr_debug("At least one server is still listening to its port");
sleep(5) if $::glob_win32; # FIXME next startup fails if no sleep
return $res;
}
@ -821,8 +821,10 @@ sub sleep_until_file_created ($$$) {
my $pidfile= shift;
my $timeout= shift;
my $pid= shift;
my $sleeptime= 100; # Milliseconds
my $loops= ($timeout * 1000) / $sleeptime;
for ( my $loop= 1; $loop <= $timeout; $loop++ )
for ( my $loop= 1; $loop <= $loops; $loop++ )
{
if ( -r $pidfile )
{
@ -835,16 +837,20 @@ sub sleep_until_file_created ($$$) {
return 0;
}
mtr_debug("Sleep 1 second waiting for creation of $pidfile");
mtr_debug("Sleep $sleeptime milliseconds waiting for ".
"creation of $pidfile");
if ( $loop % 60 == 0 )
# Print extra message every 60 seconds
my $seconds= ($loop * $sleeptime) / 1000;
if ( $seconds > 1 and $seconds % 60 == 0 )
{
my $left= $timeout - $loop;
mtr_warning("Waited $loop seconds for $pidfile to be created, " .
my $left= $timeout - $seconds;
mtr_warning("Waited $seconds seconds for $pidfile to be created, " .
"still waiting for $left seconds...");
}
sleep(1);
# Millisceond sleep emulated with select
select(undef, undef, undef, ($sleeptime/1000));
}
return 0;