summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/galera_3nodes
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/galera_3nodes')
-rw-r--r--mysql-test/suite/galera_3nodes/disabled.def12
-rw-r--r--mysql-test/suite/galera_3nodes/r/MDEV-29171.result1
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result219
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_var_node_address.result22
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result16
-rw-r--r--mysql-test/suite/galera_3nodes/t/MDEV-29171.test12
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.cnf35
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.test346
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_var_node_address.cnf8
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_var_node_address.test32
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test21
11 files changed, 696 insertions, 28 deletions
diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def
index d0e68295..728500f4 100644
--- a/mysql-test/suite/galera_3nodes/disabled.def
+++ b/mysql-test/suite/galera_3nodes/disabled.def
@@ -10,12 +10,12 @@
#
##############################################################################
-galera_2_cluster : MDEV-29877 Galera test failure on galera_2_cluster
-galera_gtid_2_cluster : MDEV-29877 Galera test failure on galera_2_cluster
-galera_ipv6_mariabackup : MDEV-24097
-galera_ipv6_mariabackup_section : MDEV-24097, MDEV-22195
-galera_vote_rejoin_mysqldump : MDEV-24481: galera_3nodes.galera_vote_rejoin_mysqldump MTR failed: mysql_shutdown failed
-galera_ssl_reload : MDEV-30172 At line 50: mysql_shutdown failed
+galera_2_cluster : MDEV-32631 galera_2_cluster: before_rollback(): Assertion `0' failed
+galera_gtid_2_cluster : MDEV-32633 galera_gtid_2_cluster: Assertion `thd->wsrep_next_trx_id() != (0x7fffffffffffffffLL * 2ULL + 1)'
+galera_ssl_reload : MDEV-32778 galera_ssl_reload failed with warning message
+galera_ipv6_mariabackup : temporarily disabled at the request of Codership
+galera_pc_bootstrap : temporarily disabled at the request of Codership
+galera_ipv6_mariabackup_section : temporarily disabled at the request of Codership
# Opensuse/suse/rocky9/rocky84/rhel9/rhel8-ppc64le .. - all same IPv6 isn't configured right or skipping or galera
galera_ipv6_rsync : Can't connect to server on '::1' (115)
galera_ipv6_rsync_section : Can't connect to server on '::1' (115)
diff --git a/mysql-test/suite/galera_3nodes/r/MDEV-29171.result b/mysql-test/suite/galera_3nodes/r/MDEV-29171.result
index 151be86d..371ce006 100644
--- a/mysql-test/suite/galera_3nodes/r/MDEV-29171.result
+++ b/mysql-test/suite/galera_3nodes/r/MDEV-29171.result
@@ -14,6 +14,7 @@ select @@wsrep_gtid_domain_id,@@wsrep_node_name;
@@wsrep_gtid_domain_id @@wsrep_node_name
100 node3
connection node_3;
+connection node_1;
connection node_2;
connection node_1;
connection node_1;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result b/mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result
new file mode 100644
index 00000000..a35f31da
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result
@@ -0,0 +1,219 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+set wsrep_sync_wait=0;
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+set wsrep_sync_wait=0;
+connection node_1;
+CREATE PROCEDURE insert_row (IN node varchar(10), IN repeat_count int)
+BEGIN
+DECLARE current_num int;
+SET current_num = 0;
+WHILE current_num < repeat_count do
+INSERT INTO t1(node, name) VALUES (node, UUID());
+SET current_num = current_num + 1;
+END WHILE;
+END|
+CREATE TABLE t1 (id bigint not null primary key auto_increment, node VARCHAR(10), name VARCHAR(64)) ENGINE=innodb;
+# node_1
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2
+connection node_2;
+# node_2
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2
+connection node_3;
+# node_3
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2
+connection node_1;
+CALL insert_row('node1', 500);;
+connection node_2;
+CALL insert_row('node2', 500);;
+connection node_3;
+CALL insert_row('node3', 500);;
+connection node_2;
+# Shutdown node_2, force SST
+connection node_2b;
+# Wait until node_2 leaves cluster
+connection node_1b;
+connection node_1;
+connection node_3;
+connection node_1;
+CALL insert_row('node1', 500);
+connection node_3;
+CALL insert_row('node3', 500);
+CREATE TABLE t2(i int primary key) engine=innodb;
+connection node_2;
+# Restart node_2
+# restart
+connection node_1b;
+# Wait until node_2 is back in cluster
+# node2 has joined
+# GTID in node1
+show variables like 'wsrep_gtid_domain_id';
+Variable_name Value
+wsrep_gtid_domain_id 1111
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2503
+connection node_2;
+# GTID in node2
+show variables like 'wsrep_gtid_domain_id';
+Variable_name Value
+wsrep_gtid_domain_id 1111
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2503
+connection node_3;
+# GTID in node3
+show variables like 'wsrep_gtid_domain_id';
+Variable_name Value
+wsrep_gtid_domain_id 1111
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2503
+# Shutdown node_3
+connection node_3;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+# Wait until node_3 leaves cluster
+connection node_1b;
+connection node_1;
+CALL insert_row('node1', 50);
+CREATE TABLE t3(i int primary key) engine=innodb;
+connection node_3;
+# Rejoin node_3
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+connection node_1b;
+# Wait until node_3 is back in cluster
+# node3 has joined
+connection node_1;
+# GTID in node1
+show variables like 'wsrep_gtid_domain_id';
+Variable_name Value
+wsrep_gtid_domain_id 1111
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2554
+connection node_2;
+# GTID in node2
+show variables like 'wsrep_gtid_domain_id';
+Variable_name Value
+wsrep_gtid_domain_id 1111
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2554
+connection node_3;
+# GTID in node3
+show variables like 'wsrep_gtid_domain_id';
+Variable_name Value
+wsrep_gtid_domain_id 1111
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2554
+# One by one shutdown all nodes
+connection node_3;
+# shutdown node_3
+connection node_2;
+# wait until node_3 is out of cluster
+# shutdown node_2
+connection node_1;
+# wait until node_2 is out of cluster
+# shutdown node_1
+# Bootstrap from node_1
+connection node_1;
+# restart: --wsrep_new_cluster
+show variables like 'wsrep_gtid_domain_id';
+Variable_name Value
+wsrep_gtid_domain_id 1111
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2554
+ANALYZE TABLE t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+CALL insert_row('node1', 100);;
+# Restart node_2
+connection node_2;
+# restart
+connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+set wsrep_sync_wait=0;
+connection node_1c;
+# wait until node_1 and node_2 are in cluster
+connection node_2;
+ALTER TABLE t2 ADD COLUMN (k int);
+CALL insert_row('node2', 100);;
+# Restart node_3
+connection node_3;
+# restart
+connection node_1c;
+# wait until all nodes are back in cluster
+after cluster restart
+connection node_2;
+connection node_1;
+connection node_1;
+node1 GTID
+show variables like 'wsrep_gtid_domain_id';
+Variable_name Value
+wsrep_gtid_domain_id 1111
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2756
+connection node_2;
+node2 GTID
+show variables like 'wsrep_gtid_domain_id';
+Variable_name Value
+wsrep_gtid_domain_id 1111
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2756
+connection node_3;
+node3 GTID
+show variables like 'wsrep_gtid_domain_id';
+Variable_name Value
+wsrep_gtid_domain_id 1111
+show variables like '%gtid_binlog_pos%';
+Variable_name Value
+gtid_binlog_pos 1111-1-2756
+connection node_1;
+table size in node1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+2750
+connection node_2;
+table size in node2
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+2750
+connection node_3;
+table size in node3
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+2750
+connection node_2;
+call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node");
+call mtr.add_suppression("WSREP: Sending JOIN failed:.*");
+call mtr.add_suppression("Sending JOIN failed:.*");
+call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST.*");
+connection node_3;
+call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node");
+call mtr.add_suppression("WSREP: Sending JOIN failed:.*");
+call mtr.add_suppression("Sending JOIN failed:.*");
+call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST.*");
+# cleanup
+connection node_1;
+DROP PROCEDURE insert_row;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+connection node_3;
+connection node_2;
+disconnect node_3;
+disconnect node_2b;
+disconnect node_1b;
+disconnect node_1c;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_var_node_address.result b/mysql-test/suite/galera_3nodes/r/galera_var_node_address.result
new file mode 100644
index 00000000..fe6c2a00
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera_var_node_address.result
@@ -0,0 +1,22 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE
+3
+CREATE TABLE t1 (f1 INTEGER) ENGINE=INNODB;
+connection node_2;
+INSERT INTO t1 VALUES (1);
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
+1
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
+1
+connection node_1;
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result b/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result
index e49a1714..6faafacd 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result
@@ -39,6 +39,9 @@ SELECT VARIABLE_VALUE AS expect_Disconnected FROM INFORMATION_SCHEMA.GLOBAL_STAT
expect_Disconnected
Disconnected
SET SESSION wsrep_on=ON;
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+expect_3
+3
SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
expect_Primary
Primary
@@ -49,17 +52,11 @@ t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
connection node_2;
-SET SESSION wsrep_on=OFF;
-SET SESSION wsrep_on=ON;
-# restart
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT COUNT(*) AS expect_0 FROM t1;
-expect_0
-0
CALL mtr.add_suppression("is inconsistent with group");
connection node_3;
SHOW CREATE TABLE t1;
@@ -71,13 +68,16 @@ DROP TABLE t1;
CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'PRIMARY'; check that column/key exists'");
connection node_1;
connection node_1;
-CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
+CALL mtr.add_suppression("Slave SQL: Error 'The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
connection node_2;
-CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
+CALL mtr.add_suppression("Slave SQL: Error 'The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found");
CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
+connection node_2;
+# restart
+connection node_1;
diff --git a/mysql-test/suite/galera_3nodes/t/MDEV-29171.test b/mysql-test/suite/galera_3nodes/t/MDEV-29171.test
index 33fa4d72..bfb7abf9 100644
--- a/mysql-test/suite/galera_3nodes/t/MDEV-29171.test
+++ b/mysql-test/suite/galera_3nodes/t/MDEV-29171.test
@@ -4,11 +4,13 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
+--source include/galera_sst_method.inc
+--source include/force_restart.inc
#
# Initially wsrep gtid domain id is 100
#
+
--connection node_1
select @@wsrep_gtid_domain_id,@@wsrep_node_name;
@@ -26,6 +28,10 @@ select @@wsrep_gtid_domain_id,@@wsrep_node_name;
--connection node_3
--source include/shutdown_mysqld.inc
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
@@ -36,6 +42,7 @@ select @@wsrep_gtid_domain_id,@@wsrep_node_name;
--source include/wait_condition.inc
--source include/shutdown_mysqld.inc
+--sleep 5
#
# Bootstrap from node_1 and change wsrep_gtid_domain_id to 200
@@ -45,12 +52,11 @@ select @@wsrep_gtid_domain_id,@@wsrep_node_name;
--source include/start_mysqld.inc
show variables like 'wsrep_gtid_domain_id';
-
#
# Restart node_2, expect that wsrep_gtid_domain_id has changed to 200
#
--connection node_2
---let $restart_parameters =
+--let $restart_parameters =
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
--source include/start_mysqld.inc
show variables like 'wsrep_gtid_domain_id';
diff --git a/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.cnf b/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.cnf
new file mode 100644
index 00000000..5bd03178
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.cnf
@@ -0,0 +1,35 @@
+!include ../galera_3nodes.cnf
+
+[mysqld.1]
+wsrep-node-name="node1"
+wsrep_gtid_domain_id=1111
+gtid_domain_id=2
+server_id=10999
+wsrep_sst_auth="root:"
+wsrep_sst_method=mariabackup
+log_slave_updates=ON
+log_bin=mariadb-bin-log
+binlog-format=row
+wsrep-gtid-mode=ON
+
+[mysqld.2]
+wsrep-node-name="node2"
+wsrep_gtid_domain_id=1112
+gtid_domain_id=3
+wsrep_sst_auth="root:"
+wsrep_sst_method=mariabackup
+log_slave_updates=ON
+log_bin=mariadb-bin-log
+binlog-format=row
+wsrep-gtid-mode=ON
+
+[mysqld.3]
+wsrep-node-name="node3"
+wsrep_gtid_domain_id=1113
+gtid_domain_id=4
+wsrep_sst_auth="root:"
+wsrep_sst_method=mariabackup
+log_slave_updates=ON
+log_bin=mariadb-bin-log
+binlog-format=row
+wsrep-gtid-mode=ON
diff --git a/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.test b/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.test
new file mode 100644
index 00000000..f41230bc
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.test
@@ -0,0 +1,346 @@
+--source include/galera_cluster.inc
+--source include/big_test.inc
+--source include/force_restart.inc
+
+
+#
+# Testing gtid consistency in 3 node cluster when nodes drop
+# and join back to cluster.
+# The tests verify that wsrep_gtid_domain_id and gtid_binlog_pos
+# remains same across the cluster
+# In the configuration, nodes have different wsrep_gtid_domain_id
+# but all nodes are supposed to receive effective domain id
+# from the bootstrap node (node_1), and use it
+#
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
+set wsrep_sync_wait=0;
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+set wsrep_sync_wait=0;
+
+--connection node_1
+DELIMITER |;
+CREATE PROCEDURE insert_row (IN node varchar(10), IN repeat_count int)
+BEGIN
+ DECLARE current_num int;
+ SET current_num = 0;
+ WHILE current_num < repeat_count do
+ INSERT INTO t1(node, name) VALUES (node, UUID());
+ SET current_num = current_num + 1;
+ END WHILE;
+END|
+DELIMITER ;|
+
+CREATE TABLE t1 (id bigint not null primary key auto_increment, node VARCHAR(10), name VARCHAR(64)) ENGINE=innodb;
+
+#
+# report initial gtid positions after table t1 is created
+#
+--echo # node_1
+show variables like '%gtid_binlog_pos%';
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
+--source include/wait_condition.inc
+
+--echo # node_2
+show variables like '%gtid_binlog_pos%';
+
+--connection node_3
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
+--source include/wait_condition.inc
+
+--echo # node_3
+show variables like '%gtid_binlog_pos%';
+
+###########################################
+# scenario: join node 2 by SST
+##########################################
+
+#
+# start concurrent insert load and stop node2 while the load is on
+#
+--connection node_1
+--send CALL insert_row('node1', 500);
+
+--connection node_2
+--send CALL insert_row('node2', 500);
+
+--connection node_3
+--send CALL insert_row('node3', 500);
+
+#
+# stop load to node 2 and shutdown the node, force SST
+#
+--connection node_2
+--reap
+
+--echo # Shutdown node_2, force SST
+--connection node_2b
+--source include/shutdown_mysqld.inc
+--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+
+--echo # Wait until node_2 leaves cluster
+--connection node_1b
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+#
+# stop the remaining load to node 1 and 3
+#
+--connection node_1
+--reap
+--connection node_3
+--reap
+
+#
+# some more inserts and DDL to nodes 1 and 3
+# while node 2 is absent
+#
+--connection node_1
+CALL insert_row('node1', 500);
+
+--connection node_3
+CALL insert_row('node3', 500);
+
+CREATE TABLE t2(i int primary key) engine=innodb;
+
+#
+# restart node 2, should join by SST
+#
+--connection node_2
+--echo # Restart node_2
+--source include/start_mysqld.inc
+
+--connection node_1b
+--echo # Wait until node_2 is back in cluster
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--echo # node2 has joined
+
+#
+# check gtid positions in all nodes
+#
+--echo # GTID in node1
+show variables like 'wsrep_gtid_domain_id';
+show variables like '%gtid_binlog_pos%';
+
+--connection node_2
+--echo # GTID in node2
+show variables like 'wsrep_gtid_domain_id';
+show variables like '%gtid_binlog_pos%';
+
+--connection node_3
+--echo # GTID in node3
+show variables like 'wsrep_gtid_domain_id';
+show variables like '%gtid_binlog_pos%';
+
+
+###########################################
+# scenario: join node 3 by IST
+##########################################
+
+--echo # Shutdown node_3
+--connection node_3
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+
+--echo # Wait until node_3 leaves cluster
+--connection node_1b
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+#
+# do some inserts and DDL to node 1
+# while node 3 is absent
+#
+--connection node_1
+CALL insert_row('node1', 50);
+
+CREATE TABLE t3(i int primary key) engine=innodb;
+
+#
+# remove isolation in node 3, should join by IST
+#
+--connection node_3
+--echo # Rejoin node_3
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+
+--connection node_1b
+--echo # Wait until node_3 is back in cluster
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--echo # node3 has joined
+
+#
+# check gtid positions in all nodes
+#
+--connection node_1
+--echo # GTID in node1
+show variables like 'wsrep_gtid_domain_id';
+show variables like '%gtid_binlog_pos%';
+
+--connection node_2
+--echo # GTID in node2
+show variables like 'wsrep_gtid_domain_id';
+show variables like '%gtid_binlog_pos%';
+
+--connection node_3
+--echo # GTID in node3
+show variables like 'wsrep_gtid_domain_id';
+show variables like '%gtid_binlog_pos%';
+
+
+###########################################
+# scenario: restart full custer
+##########################################
+
+
+#
+# stop all nodes, one by one
+#
+--echo # One by one shutdown all nodes
+--connection node_3
+--echo # shutdown node_3
+--source include/shutdown_mysqld.inc
+--remove_file $MYSQLTEST_VARDIR/mysqld.3/data/grastate.dat
+
+--connection node_2
+--echo # wait until node_3 is out of cluster
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+--echo # shutdown node_2
+--source include/shutdown_mysqld.inc
+--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+
+--connection node_1
+--echo # wait until node_2 is out of cluster
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+--echo # shutdown node_1
+--source include/shutdown_mysqld.inc
+
+#
+# bootstap cluster in order node1 - node2 - node3
+# send some inserts and DDL after each node started
+#
+--sleep 5
+--echo # Bootstrap from node_1
+--connection node_1
+--let $restart_parameters = --wsrep_new_cluster
+--source include/start_mysqld.inc
+
+show variables like 'wsrep_gtid_domain_id';
+show variables like '%gtid_binlog_pos%';
+
+ANALYZE TABLE t2;
+--send CALL insert_row('node1', 100);
+
+--echo # Restart node_2
+--connection node_2
+--let $restart_parameters =
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+#
+# connection node_1b may not be functional anymore, after node was
+# shutdown, open node_1c for controlling node 1 state
+#
+--connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1
+set wsrep_sync_wait=0;
+--connection node_1c
+--echo # wait until node_1 and node_2 are in cluster
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--connection node_2
+ALTER TABLE t2 ADD COLUMN (k int);
+--send CALL insert_row('node2', 100);
+
+
+--echo # Restart node_3
+--connection node_3
+--let $restart_parameters =
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.3.expect
+--source include/start_mysqld.inc
+
+--connection node_1c
+--echo # wait until all nodes are back in cluster
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+--echo after cluster restart
+
+# stop load for nodes 1 and 2
+--connection node_2
+--reap
+
+--connection node_1
+--reap
+
+#
+# check gtid positions in all nodes
+#
+--connection node_1
+--echo node1 GTID
+show variables like 'wsrep_gtid_domain_id';
+show variables like '%gtid_binlog_pos%';
+
+--connection node_2
+--echo node2 GTID
+show variables like 'wsrep_gtid_domain_id';
+show variables like '%gtid_binlog_pos%';
+
+--connection node_3
+--echo node3 GTID
+show variables like 'wsrep_gtid_domain_id';
+show variables like '%gtid_binlog_pos%';
+
+#
+# check table size in all nodes
+#
+--connection node_1
+--echo table size in node1
+SELECT COUNT(*) FROM t1;
+
+--connection node_2
+--echo table size in node2
+SELECT COUNT(*) FROM t1;
+
+--connection node_3
+--echo table size in node3
+SELECT COUNT(*) FROM t1;
+
+#
+# cleanups
+#
+--connection node_2
+call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node");
+call mtr.add_suppression("WSREP: Sending JOIN failed:.*");
+call mtr.add_suppression("Sending JOIN failed:.*");
+call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST.*");
+--connection node_3
+call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node");
+call mtr.add_suppression("WSREP: Sending JOIN failed:.*");
+call mtr.add_suppression("Sending JOIN failed:.*");
+call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST.*");
+
+--echo # cleanup
+--connection node_1
+
+DROP PROCEDURE insert_row;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+
+--connection node_3
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'
+--source include/wait_condition.inc
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'
+--source include/wait_condition.inc
+
+--disconnect node_3
+--disconnect node_2b
+--disconnect node_1b
+--disconnect node_1c
diff --git a/mysql-test/suite/galera_3nodes/t/galera_var_node_address.cnf b/mysql-test/suite/galera_3nodes/t/galera_var_node_address.cnf
new file mode 100644
index 00000000..aa0c47f1
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_var_node_address.cnf
@@ -0,0 +1,8 @@
+!include ../galera_3nodes.cnf
+
+[mysqld.2]
+wsrep_node_address=127.0.0.1
+
+[mysqld.3]
+wsrep_node_address=localhost
+
diff --git a/mysql-test/suite/galera_3nodes/t/galera_var_node_address.test b/mysql-test/suite/galera_3nodes/t/galera_var_node_address.test
new file mode 100644
index 00000000..08c0d2e4
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_var_node_address.test
@@ -0,0 +1,32 @@
+#
+# Test wsrep_node_address . The galera_var_node_address.cnf contains various settings for
+# wsrep_node_address, so in this test we simply confirm that the cluster has started up correctly.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=INNODB;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+INSERT INTO t1 VALUES (1);
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_3
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+
+--connection node_1
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test b/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test
index 70d58cb2..6c7b255b 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test
@@ -59,6 +59,7 @@ SET SESSION wsrep_on=ON;
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
+SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
# Confirm that the table is now identical throughout
@@ -67,18 +68,7 @@ SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WH
SHOW CREATE TABLE t1;
--connection node_2
-SET SESSION wsrep_on=OFF;
---let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
---source include/wait_condition.inc
---source include/galera_wait_ready.inc
-SET SESSION wsrep_on=ON;
-
-# restart node so we don't fail on WSREP_START_POSITION internal check
---source include/restart_mysqld.inc
---source include/wait_until_connected_again.inc
-
SHOW CREATE TABLE t1;
-SELECT COUNT(*) AS expect_0 FROM t1;
CALL mtr.add_suppression("is inconsistent with group");
--connection node_3
@@ -89,5 +79,14 @@ CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'PRIMARY'; check that col
--connection node_1
--source suite/galera/include/galera_sst_restore.inc
+--connection node_2
+# restart node so we don't fail on WSREP_START_POSITION internal check
+--source include/restart_mysqld.inc
+--source include/wait_until_connected_again.inc
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
# Restore original auto_increment_offset values.
--source ../galera/include/auto_increment_offset_restore.inc