Commit 3dd1ef7b authored by unknown's avatar unknown
Browse files

Fix problem where mysql-test-run.pl fails to start up the mysqld after a...

Fix problem where mysql-test-run.pl fails to start up the mysqld after a failed test. Shows up on win hosts where one failed test case make subsequent ones fails with error "Could not open connection 'default': 2003 Can't connect to MySQL server on 'localhost'" 


mysql-test/lib/mtr_process.pl:
  Reset the associated "pid" of masters and slave when building the list of processes to shutdown.
parent b4401f8a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -409,6 +409,7 @@ sub mtr_kill_leftovers () {

    mtr_debug("  - Master mysqld " .
              "(idx: $idx; pid: '$pidfile'; socket: '$sockfile'; port: $port)");
    $::master->[$idx]->{'pid'}= 0; # Assume we are done with it
  }

  for ( my $idx= 0; $idx < 3; $idx++ )
@@ -426,6 +427,8 @@ sub mtr_kill_leftovers () {

    mtr_debug("  - Slave mysqld " .
              "(idx: $idx; pid: '$pidfile'; socket: '$sockfile'; port: $port)");

    $::slave->[$idx]->{'pid'}= 0; # Assume we are done with it
  }

  mtr_mysqladmin_shutdown(\@args, 20);