Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-05-28 18:11:47+02:00, msvensson@pilot.(none) +2 -0
Bug#25657 mysql-test-run.pl kill itself under ActiveState perl
- Avoid killing the own process by adding various checks of
what current perl interpreter is being used
mysql-test/lib/mtr_process.pl@stripped, 2007-05-28 18:11:46+02:00, msvensson@pilot.(none) +25 -2
- Get the real pid from pidfile and add it to the
list of pids to kill, since the "pseudo pid" can't
be reliably killed
- Never send SIGTERM to a pseudo pid
mysql-test/mysql-test-run.pl@stripped, 2007-05-28 18:11:46+02:00, msvensson@pilot.(none) +15 -8
- Set name of file where mysqld should send stderr and remove the
parameters to mtr_spawn that would redirect to that file.
- Don't terminate if the "mysqltest-time" file could not be found
when trying to determined cause for a test being skipped
or when analyzing test failure
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: pilot.(none)
# Root: /data/msvensson/mysql/mysql-4.1-maint
--- 1.34/mysql-test/lib/mtr_process.pl 2007-04-23 11:01:22 +02:00
+++ 1.35/mysql-test/lib/mtr_process.pl 2007-05-28 18:11:46 +02:00
@@ -599,6 +599,14 @@
if ( $srv->{'pid'} )
{
$mysqld_pids{$srv->{'pid'}}= 1;
+
+ if ($::glob_win32_perl)
+ {
+ # Get the real pid from pidfile and add it to the
+ # list of pids to kill
+ my $real_pid= mtr_get_pid_from_file($srv->{'pidfile'});
+ $mysqld_pids{$real_pid}= 1;
+ }
}
else
{
@@ -1086,8 +1094,12 @@
foreach my $pid (@$pids)
{
-
- if ($pid <= 0)
+ if ($::glob_win32_perl)
+ {
+ # Any pid is legal in ActiveState perl
+ # Negative number just indicates it's a pseudo pid
+ }
+ elsif ($pid <= 0)
{
mtr_warning("Trying to kill illegal pid: $pid");
next;
@@ -1095,6 +1107,17 @@
foreach my $sig (15, 9)
{
+
+ if ($::glob_win32_perl and $pid < 0 and $sig == 15)
+ {
+ # Pseudo pids(threads in the same process) are being used,
+ # trying to kill one of those with "kill -15 $pid" will cause the
+ # pseudo thread to call exit(15)" - see perl-X.X.X/win32/win32.c in the
+ # function 'sig_terminate' - and thus terminating
+ # the whole script
+ next;
+ }
+
last if mtr_im_kill_process([ $pid ], $sig, 10, 1);
}
}
--- 1.182/mysql-test/mysql-test-run.pl 2007-05-16 17:51:28 +02:00
+++ 1.183/mysql-test/mysql-test-run.pl 2007-05-28 18:11:46 +02:00
@@ -3100,8 +3100,9 @@
my ($tinfo)= @_;
# Open mysqltest.log
- my $F= IO::File->new($path_timefile) or
- mtr_error("can't open file \"$path_timefile\": $!");
+ my $F= IO::File->new("$path_timefile") or
+ mtr_warning("can't open file \"$path_timefile\": $!") and return;
+
my $reason;
while ( my $line= <$F> )
@@ -3155,7 +3156,7 @@
# Open mysqltest.log
my $F= IO::File->new($path_timefile) or
- mtr_error("can't open file \"$path_timefile\": $!");
+ mtr_warning("can't open file \"$path_timefile\": $!") and return;
while ( my $line= <$F> )
{
@@ -3571,6 +3572,11 @@
# Turn on logging, will be sent to tables
mtr_add_arg($args, "%s--log=", $prefix);
}
+
+ # Set name of stderr log
+ mtr_add_arg($args, "%s--log-error=%s", $prefix,
+ $master->[$idx]->{'path_myerr'});
+
}
if ( $type eq 'slave' )
@@ -3660,6 +3666,11 @@
mtr_add_arg($args, "%s--log=", $prefix);
}
+ # Set name of stderr log
+ mtr_add_arg($args, "%s--log-error=%s", $prefix,
+ $master->[$idx]->{'path_myerr'});
+
+
} # end slave
if ( $opt_debug )
@@ -3817,11 +3828,7 @@
if ( defined $exe )
{
- $pid= mtr_spawn($exe, $args, "",
- $mysqld->{'path_myerr'},
- $mysqld->{'path_myerr'},
- "",
- { append_log_file => 1 });
+ $pid= mtr_spawn($exe, $args, "","","","",{});
}
| Thread |
|---|
| • bk commit into 4.1 tree (msvensson:1.2657) BUG#25657 | msvensson | 28 May |