mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge include/mysql.h: Auto merged include/sql_common.h: Auto merged libmysql/libmysql.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/mysqldump.result: Auto merged mysql-test/t/udf.test: Auto merged ndb/src/mgmsrv/ConfigInfo.cpp: Auto merged sql/item.cc: Auto merged sql/item_func.h: Auto merged sql/mysql_priv.h: Auto merged sql/slave.cc: Auto merged sql/sp.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_parse.cc: Auto merged sql-common/client.c: Auto merged sql/sql_yacc.yy: Auto merged sql/table.h: Auto merged mysql-test/r/ps.result: Manual merge. mysql-test/r/sp.result: Manual merge. mysql-test/t/ps.test: Manual merge. mysql-test/t/sp.test: Manual merge. sql/sql_prepare.cc: Manual merge. sql/table.cc: Manual merge. tests/mysql_client_test.c: Manual merge.
This commit is contained in:
@@ -2898,12 +2898,16 @@ sub im_stop($) {
|
||||
|
||||
while (1)
|
||||
{
|
||||
# Check that IM-main died.
|
||||
|
||||
if (kill (0, $instance_manager->{'pid'}))
|
||||
{
|
||||
mtr_debug("IM-main is still alive.");
|
||||
last;
|
||||
}
|
||||
|
||||
# Check that IM-angel died.
|
||||
|
||||
if (defined $instance_manager->{'angel_pid'} &&
|
||||
kill (0, $instance_manager->{'angel_pid'}))
|
||||
{
|
||||
@@ -2911,21 +2915,39 @@ sub im_stop($) {
|
||||
last;
|
||||
}
|
||||
|
||||
# Check that all guarded mysqld-instances died.
|
||||
|
||||
my $guarded_mysqlds_dead= 1;
|
||||
|
||||
foreach my $pid (@mysqld_pids)
|
||||
{
|
||||
if (kill (0, $pid))
|
||||
{
|
||||
mtr_debug("Guarded mysqld ($pid) is still alive.");
|
||||
$guarded_mysqlds_dead= 0;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
last unless $guarded_mysqlds_dead;
|
||||
|
||||
# Ok, all necessary processes are dead.
|
||||
|
||||
$clean_shutdown= 1;
|
||||
last;
|
||||
}
|
||||
|
||||
# Kill leftovers (the order is important).
|
||||
|
||||
if ($clean_shutdown)
|
||||
{
|
||||
mtr_debug("IM-shutdown was clean -- all processed died.");
|
||||
}
|
||||
else
|
||||
{
|
||||
mtr_debug("IM failed to shutdown gracefully. We have to clean the mess...");
|
||||
}
|
||||
|
||||
unless ($clean_shutdown)
|
||||
{
|
||||
|
||||
@@ -2946,17 +2968,24 @@ sub im_stop($) {
|
||||
mtr_kill_processes(\@mysqld_pids);
|
||||
|
||||
# Complain in error log so that a warning will be shown.
|
||||
#
|
||||
# TODO: unless BUG#20761 is fixed, we will print the warning
|
||||
# to stdout, so that it can be seen on console and does not
|
||||
# produce pushbuild error.
|
||||
|
||||
my $errlog= "$opt_vardir/log/mysql-test-run.pl.err";
|
||||
|
||||
open (ERRLOG, ">>$errlog") ||
|
||||
mtr_error("Can not open error log ($errlog)");
|
||||
# my $errlog= "$opt_vardir/log/mysql-test-run.pl.err";
|
||||
#
|
||||
# open (ERRLOG, ">>$errlog") ||
|
||||
# mtr_error("Can not open error log ($errlog)");
|
||||
#
|
||||
# my $ts= localtime();
|
||||
# print ERRLOG
|
||||
# "Warning: [$ts] Instance Manager did not shutdown gracefully.\n";
|
||||
#
|
||||
# close ERRLOG;
|
||||
|
||||
my $ts= localtime();
|
||||
print ERRLOG
|
||||
"Warning: [$ts] Instance Manager did not shutdown gracefully.\n";
|
||||
|
||||
close ERRLOG;
|
||||
print "Warning: [$ts] Instance Manager did not shutdown gracefully.\n";
|
||||
}
|
||||
|
||||
# That's all.
|
||||
|
Reference in New Issue
Block a user