diff options
Diffstat (limited to 'mysql-test/include/galera_suspend.inc')
-rw-r--r-- | mysql-test/include/galera_suspend.inc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/include/galera_suspend.inc b/mysql-test/include/galera_suspend.inc new file mode 100644 index 00000000..d4037d89 --- /dev/null +++ b/mysql-test/include/galera_suspend.inc @@ -0,0 +1,14 @@ +# +# This macro suspends the current node +# + +--let _SUSPEND_NODE_PIDFILE = `SELECT @@pid_file` +--echo Suspending node ... + +--perl + my $pid_filename = $ENV{'_SUSPEND_NODE_PIDFILE'}; + my $mysqld_pid = `cat $pid_filename`; + chomp($mysqld_pid); + system("kill -SIGSTOP $mysqld_pid"); + exit(0); +EOF |