# # This test performs basic checks on the contents of the wsrep_schema # # wsrep_members_history checks are temporarily disabled until it # can be made configurable. # --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 # Save original auto_increment_offset values. --let $node_1=node_1 --let $node_2=node_2 --let $node_3=node_3 --source ../galera/include/auto_increment_offset_save.inc # Make the test fail if table structure has changed 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 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(*) = (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 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 #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'); #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; --connection node_2 --source include/shutdown_mysqld.inc --connection node_1 --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(*) = 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); --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); --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 --connection node_1 CALL mtr.add_suppression("SYNC message from member"); --connection node_2 CALL mtr.add_suppression("SYNC message from member"); --connection node_3 CALL mtr.add_suppression("SYNC message from member");