From 0dc08b90400a166065e7c3fea0b187885a629354 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Sep 2006 16:43:42 +0200 Subject: [PATCH 1/2] Fix warnings in mysql-test-run.pl mysql-test/lib/mtr_stress.pl: Remove duplicate definition of variable mysql-test/mysql-test-run.pl: Fix spelling error Fix warning about uninitialised warning --- mysql-test/lib/mtr_stress.pl | 1 - mysql-test/mysql-test-run.pl | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mysql-test/lib/mtr_stress.pl b/mysql-test/lib/mtr_stress.pl index 77c3d8bb030..92bb220461b 100644 --- a/mysql-test/lib/mtr_stress.pl +++ b/mysql-test/lib/mtr_stress.pl @@ -21,7 +21,6 @@ sub run_stress_test () { my $args; - my $stress_basedir; my $stress_suitedir; mtr_report("Starting stress testing\n"); diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 49ffd8fb02f..1b5ac396e95 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1313,7 +1313,7 @@ sub kill_running_server () { { # Ensure that no old mysqld test servers are running # This is different from terminating processes we have - # started from ths run of the script, this is terminating + # started from this run of the script, this is terminating # leftovers from previous runs. mtr_report("Killing Possible Leftover Processes"); @@ -2752,7 +2752,7 @@ sub stop_masters () { my @args; - for ( my $idx; $idx < 2; $idx++ ) + for ( my $idx= 0; $idx < 2; $idx++ ) { # FIXME if we hit ^C before fully started, this test will prevent # the mysqld process from being killed @@ -2783,7 +2783,7 @@ sub stop_slaves () { my @args; - for ( my $idx; $idx < 3; $idx++ ) + for ( my $idx= 0; $idx < 3; $idx++ ) { if ( $slave->[$idx]->{'pid'} ) { From ea1a9e41a62d2d49b551a0d229c38dda87bdafcc Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Sep 2006 16:48:01 +0200 Subject: [PATCH 2/2] Don't bother to remove the pid_file in mtr_kill_leftovers as it could potentially remove a the pidfile before the process is killed. The pid file will be removed later when var/ directory is recreated. --- mysql-test/lib/mtr_process.pl | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index bf869ca91c4..1e982a83619 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -470,14 +470,6 @@ sub mtr_kill_leftovers () { mtr_debug("Got pid: $pid from file '$pidfile'"); - # Race, could have been removed between I tested with -f - # and the unlink() below, so I better check again with -f - - if ( ! unlink($pidfile) and -f $pidfile ) - { - mtr_error("can't remove $pidfile"); - } - if ( $::glob_cygwin_perl or kill(0, $pid) ) { mtr_debug("There is process with pid $pid -- scheduling for kill.");