summaryrefslogtreecommitdiff
path: root/mysql-test/include/galera_cluster.inc
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/include/galera_cluster.inc')
-rw-r--r--mysql-test/include/galera_cluster.inc23
1 files changed, 18 insertions, 5 deletions
diff --git a/mysql-test/include/galera_cluster.inc b/mysql-test/include/galera_cluster.inc
index 7f76ea59c7f..48b5bc631db 100644
--- a/mysql-test/include/galera_cluster.inc
+++ b/mysql-test/include/galera_cluster.inc
@@ -3,16 +3,29 @@
#
# Description
# -----------
-# Configure galera cluster with 2 nodes.
+# Configure galera cluster with $galera_cluster_size (default: 2) nodes.
#
---let $galera_cluster_size = 2
+if (!$galera_cluster_size)
+{
+# --die ERROR IN TEST: $galera_cluster_size variable must be set
+ --let $galera_cluster_size = 2
+}
+
--source include/galera_init.inc
--source include/have_innodb.inc
--source include/galera_wait_ready.inc
---connection node_2
---source include/galera_wait_ready.inc
---source include/have_innodb.inc
+
+--let $_galera_node= $galera_cluster_size
+
+while ($_galera_node != 1)
+{
+ --connection node_$_galera_node
+ --source include/galera_wait_ready.inc
+ --source include/have_innodb.inc
+
+ --dec $_galera_node
+}
--connection node_1