diff options
Diffstat (limited to 'mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test')
-rw-r--r-- | mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test | 52 |
1 files changed, 22 insertions, 30 deletions
diff --git a/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test index fb3af2cd25d..52bbf3a652c 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test +++ b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test @@ -6,7 +6,6 @@ # --source include/galera_cluster.inc ---source include/have_innodb.inc --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 --connection node_1 @@ -20,65 +19,58 @@ SHOW CREATE TABLE mysql.wsrep_cluster; SHOW CREATE TABLE mysql.wsrep_cluster_members; -#disabled SHOW CREATE TABLE mysql.wsrep_member_history; # Checks for the wsrep_cluster table -SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster; +SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster; + SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; # Checks for the wsrep_cluster_members table -SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members; +SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members; + SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members; -SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid'); + +SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid'); SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members; + SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members; -# Checks for the wsrep_cluster_member_history table +--connection node_2 -#disabled SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_member_history; -#disabled SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_member_history; -SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid'); +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc -#disabled SELECT last_view_id = (SELECT view_id FROM mysql.wsrep_cluster) FROM mysql.wsrep_cluster_member_history; -#disabled SELECT last_view_seqno = (SELECT view_seqno FROM mysql.wsrep_cluster) FROM mysql.wsrep_cluster_member_history; -#disabled SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_member_history; -#disabled SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_member_history; +SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members; ---connection node_2 --source include/shutdown_mysqld.inc --connection node_1 ---source include/wait_until_connected_again.inc + +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; -SELECT COUNT(*) = 2 FROM mysql.wsrep_cluster_members; -#disabled SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_member_history; -#disabled SELECT COUNT(*) = 2 FROM mysql.wsrep_cluster_member_history WHERE last_view_id = (SELECT MAX(last_view_id) FROM mysql.wsrep_cluster_member_history); + +SELECT COUNT(*) AS EXPECT_2 FROM mysql.wsrep_cluster_members; --connection node_2 let $restart_noprint=2; --source include/start_mysqld.inc --source include/wait_until_connected_again.inc -SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; -SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members; -#disabled SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_member_history WHERE last_view_id = (SELECT MAX(last_view_id) FROM mysql.wsrep_cluster_member_history); +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc ---connection node_1 SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; -SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members; -#disabled SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_member_history WHERE last_view_id = (SELECT MAX(last_view_id) FROM mysql.wsrep_cluster_member_history); ---source ../galera/include/auto_increment_offset_restore.inc +SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members; --connection node_1 -CALL mtr.add_suppression("SYNC message from member"); +SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster; ---connection node_2 -CALL mtr.add_suppression("SYNC message from member"); +SELECT COUNT(*) AS EXPECT_3 FROM mysql.wsrep_cluster_members; ---connection node_3 -CALL mtr.add_suppression("SYNC message from member"); +--source ../galera/include/auto_increment_offset_restore.inc |