mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into mysql.com:/home/jimw/my/mysql-5.1-clean BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-mysql_upgrade.dsp: Delete: VC++Files/client/mysql_upgrade.dsp BitKeeper/deleted/.del-mysql_upgrade_ia64.dsp: Delete: VC++Files/client/mysql_upgrade_ia64.dsp BitKeeper/deleted/.del-mysql_upgrade.c: Delete: client/mysql_upgrade.c VC++Files/mysql.dsw: Auto merged VC++Files/mysql.sln: Auto merged VC++Files/mysql_ia64.dsw: Auto merged client/mysql.cc: Auto merged config/ac-macros/zlib.m4: Auto merged configure.in: Auto merged extra/yassl/Makefile.am: Auto merged extra/yassl/taocrypt/Makefile.am: Auto merged include/my_global.h: Auto merged include/mysql.h: Auto merged libmysql/libmysql.def: Auto merged libmysqld/libmysqld.def: Auto merged mysql-test/r/grant2.result: Auto merged mysql-test/r/sp-security.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/trigger.result: Auto merged mysql-test/r/udf.result: Auto merged mysql-test/t/grant2.test: Auto merged mysql-test/t/rpl_openssl.test: Auto merged mysql-test/t/rpl_rotate_logs.test: Auto merged mysql-test/t/sp-security.test: Auto merged mysql-test/t/trigger.test: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_subselect.cc: Auto merged sql-common/client.c: Auto merged sql/mysqld.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_parse.cc: Auto merged client/Makefile.am: Resolve conflict config/ac-macros/yassl.m4: Resolve conflict mysql-test/include/have_udf.inc: Resolve conflict mysql-test/lib/mtr_process.pl: Resolve conflict mysql-test/mysql-test-run.pl: Resolve conflict mysql-test/r/have_udf.require: Resolve conflict mysql-test/r/rpl_openssl.result: Resolve conflict mysql-test/t/disabled.def: Resolve conflict mysql-test/t/information_schema.test: Resolve conflict server-tools/instance-manager/instance_options.cc: Resolve conflict sql/mysql_priv.h: Resolve conflict sql/set_var.cc: Resolve conflict support-files/mysql.spec.sh: Resolve conflict
This commit is contained in:
@@ -12,6 +12,7 @@ sub mtr_init_args ($);
|
||||
sub mtr_add_arg ($$@);
|
||||
sub mtr_path_exists(@);
|
||||
sub mtr_script_exists(@);
|
||||
sub mtr_file_exists(@);
|
||||
sub mtr_exe_exists(@);
|
||||
sub mtr_copy_dir($$);
|
||||
sub mtr_same_opts($$);
|
||||
@@ -94,6 +95,14 @@ sub mtr_script_exists (@) {
|
||||
}
|
||||
}
|
||||
|
||||
sub mtr_file_exists (@) {
|
||||
foreach my $path ( @_ )
|
||||
{
|
||||
return $path if -e $path;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
sub mtr_exe_exists (@) {
|
||||
my @path= @_;
|
||||
map {$_.= ".exe"} @path if $::glob_win32;
|
||||
@@ -111,18 +120,27 @@ sub mtr_exe_exists (@) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub mtr_copy_dir($$) {
|
||||
my $srcdir= shift;
|
||||
my $dstdir= shift;
|
||||
my $from_dir= shift;
|
||||
my $to_dir= shift;
|
||||
|
||||
mkpath("$to_dir");
|
||||
opendir(DIR, "$from_dir")
|
||||
or mtr_error("Can't find $from_dir$!");
|
||||
for(readdir(DIR)) {
|
||||
next if "$_" eq "." or "$_" eq "..";
|
||||
if ( -d "$from_dir/$_" )
|
||||
{
|
||||
mtr_copy_dir("$from_dir/$_", "$to_dir/$_");
|
||||
next;
|
||||
}
|
||||
copy("$from_dir/$_", "$to_dir/$_");
|
||||
}
|
||||
closedir(DIR);
|
||||
|
||||
# Create destination directory
|
||||
mkpath($dstdir);
|
||||
find(\&mtr_copy_one_file, $dstdir);
|
||||
}
|
||||
|
||||
sub mtr_copy_one_file {
|
||||
print $File::Find::name, "\n";
|
||||
}
|
||||
|
||||
sub mtr_same_opts ($$) {
|
||||
my $l1= shift;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user