summaryrefslogtreecommitdiff
path: root/mysql-test/include/galera_suspend.inc
diff options
context:
space:
mode:
authorJulius Goryavsky <sysprg@gmail.com>2019-01-30 15:16:36 +0100
committerJulius Goryavsky <sysprg@gmail.com>2019-01-30 22:28:23 +0100
commitc9f0a4a9bf52dedb229c7b12eee05db2b08a0289 (patch)
tree773d66aeaaa744adddeb9c87501e2effdc46855d /mysql-test/include/galera_suspend.inc
parent36be0a5aef0376c526d68007da1c11ac440f0d8b (diff)
downloadmariadb-git-c9f0a4a9bf52dedb229c7b12eee05db2b08a0289.tar.gz
MDEV-18426: Most of the mtr tests in the galera_3nodes suite fail
Most of the mtr tests in the galera_3nodes suite fail for a variety of reasons with a variety of errors. Some tests simply need to add the missing "connection" lines to the result files, but many of them fail due to substantial errors that require reworking test files. This patch adds the missing "connection" lines to the result files and fixes several substantial flaws in the galera_3nodes suite tests and in the mtr framework service files, adapting the tests from galera_3nodes for the current version of MariaDB. https://jira.mariadb.org/browse/MDEV-18426
Diffstat (limited to 'mysql-test/include/galera_suspend.inc')
-rw-r--r--mysql-test/include/galera_suspend.inc14
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 00000000000..d4037d8958c
--- /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