| 1 |
--echo Killing server ... |
| 2 |
|
| 3 |
if (!$kill_signal) |
| 4 |
{ |
| 5 |
--let $kill_signal = KILL |
| 6 |
} |
| 7 |
|
| 8 |
# Write file to make mysql-test-run.pl expect the crash, but don't start it |
| 9 |
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')` |
| 10 |
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect |
| 11 |
--write_line wait $_expect_file_name |
| 12 |
|
| 13 |
# Kill the connected server |
| 14 |
--disable_reconnect |
| 15 |
--let KILL_SIGNAL_VALUE = $kill_signal |
| 16 |
--let KILL_NODE_PIDFILE = `SELECT @@pid_file` |
| 17 |
|
| 18 |
--perl |
| 19 |
my $kill_sig = $ENV{'KILL_SIGNAL_VALUE'}; |
| 20 |
my $pid_filename = $ENV{'KILL_NODE_PIDFILE'}; |
| 21 |
my $mysqld_pid = `cat $pid_filename`; |
| 22 |
chomp($mysqld_pid); |
| 23 |
system("kill -s $kill_sig $mysqld_pid"); |
| 24 |
exit(0); |
| 25 |
EOF |
| 26 |
|
| 27 |
--source include/wait_until_disconnected.inc |