summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/include/kill_galera.inc
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/galera/include/kill_galera.inc')
-rw-r--r--mysql-test/suite/galera/include/kill_galera.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/mysql-test/suite/galera/include/kill_galera.inc b/mysql-test/suite/galera/include/kill_galera.inc
index d7f665df6c7..98ebf4ff35d 100644
--- a/mysql-test/suite/galera/include/kill_galera.inc
+++ b/mysql-test/suite/galera/include/kill_galera.inc
@@ -1,5 +1,10 @@
--echo Killing server ...
+if (!$kill_signal)
+{
+--let $kill_signal = 9
+}
+
# Write file to make mysql-test-run.pl expect the crash, but don't start it
--let $_server_id= `SELECT @@server_id`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
@@ -7,13 +12,15 @@
# Kill the connected server
--disable_reconnect
+--let KILL_SIGNAL_VALUE = $kill_signal
--let KILL_NODE_PIDFILE = `SELECT @@pid_file`
--perl
+ my $kill_sig = $ENV{'KILL_SIGNAL_VALUE'};
my $pid_filename = $ENV{'KILL_NODE_PIDFILE'};
my $mysqld_pid = `cat $pid_filename`;
chomp($mysqld_pid);
- system("kill -9 $mysqld_pid");
+ system("kill -s $kill_sig $mysqld_pid");
exit(0);
EOF