summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-08-03 09:32:58 +0200
committerunknown <msvensson@neptunus.(none)>2006-08-03 09:32:58 +0200
commited44a2ee51d7ed34bc98178cd03b3260342c5c06 (patch)
treeef70ce093b8f53435eb03a5e77c0f0c6b76b7b77 /mysql-test/mysql-test-run.pl
parent695c534d76c68ce0b8afa9c261e41ab9a24d93b2 (diff)
parent3c8150b79bf5302879897e0d1ebd594798bb419e (diff)
downloadmariadb-git-ed44a2ee51d7ed34bc98178cd03b3260342c5c06.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint client/mysql.cc: Auto merged client/mysqltest.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/date_formats.result: Auto merged mysql-test/r/union.result: Auto merged mysql-test/t/union.test: Auto merged sql/field.cc: Auto merged sql/item.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_strfunc.cc: Auto merged sql/item_strfunc.h: Auto merged sql/item_subselect.cc: Auto merged sql/item_sum.cc: Auto merged sql/sql_yacc.yy: Auto merged mysql-test/r/func_group.result: Merge manually mysql-test/t/func_group.test: Merge manually
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl47
1 files changed, 38 insertions, 9 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index f029924e292..c31b35c07d8 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -2912,12 +2912,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'}))
{
@@ -2925,21 +2929,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)
{
@@ -2960,17 +2982,24 @@ sub im_stop($) {
mtr_kill_processes(\@mysqld_pids);
# Complain in error log so that a warning will be shown.
-
- my $errlog= "$opt_vardir/log/mysql-test-run.pl.err";
-
- open (ERRLOG, ">>$errlog") ||
- mtr_error("Can not open error log ($errlog)");
+ #
+ # 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 $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.