| 1 |
# |
| 2 |
# GCF-363 Inconsistency voting: If in a 3-node cluster the nodes with applier |
| 3 |
# error survive, the other node can not join properly |
| 4 |
# |
| 5 |
--source include/galera_cluster.inc |
| 6 |
--source include/have_innodb.inc |
| 7 |
|
| 8 |
--let $galera_connection_name = node_3 |
| 9 |
--let $galera_server_number = 3 |
| 10 |
--source include/galera_connect.inc |
| 11 |
|
| 12 |
# Save original auto_increment_offset values. |
| 13 |
--let $node_1=node_1 |
| 14 |
--let $node_2=node_2 |
| 15 |
--let $node_3=node_3 |
| 16 |
--source ../galera/include/auto_increment_offset_save.inc |
| 17 |
|
| 18 |
--connection node_1 |
| 19 |
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) ENGINE=InnoDB; |
| 20 |
|
| 21 |
SET GLOBAL wsrep_on=OFF; |
| 22 |
INSERT INTO t1 VALUES (1, 'a'); |
| 23 |
SET GLOBAL wsrep_on=ON; |
| 24 |
|
| 25 |
--connection node_2 |
| 26 |
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; |
| 27 |
--source include/wait_condition.inc |
| 28 |
|
| 29 |
SET GLOBAL wsrep_on=OFF; |
| 30 |
INSERT INTO t1 VALUES (1, 'a'); |
| 31 |
SET GLOBAL wsrep_on=ON; |
| 32 |
|
| 33 |
--connection node_3 |
| 34 |
INSERT INTO t1 VALUES (1, 'b'); |
| 35 |
SET SESSION wsrep_sync_wait = 0; |
| 36 |
--let $wait_condition = SELECT VARIABLE_VALUE = 'OFF' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' |
| 37 |
--source include/wait_condition.inc |
| 38 |
SHOW STATUS LIKE 'wsrep_cluster_status'; |
| 39 |
|
| 40 |
--connection node_1 |
| 41 |
# Wait until node #3 leaves the cluster |
| 42 |
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' |
| 43 |
--source include/wait_condition.inc |
| 44 |
|
| 45 |
--connection node_3 |
| 46 |
SET SESSION wsrep_on=OFF; |
| 47 |
--source include/restart_mysqld.inc |
| 48 |
--source include/wait_until_connected_again.inc |
| 49 |
SET SESSION wsrep_on=ON; |
| 50 |
|
| 51 |
--connection node_1 |
| 52 |
SELECT * FROM t1; |
| 53 |
|
| 54 |
--connection node_2 |
| 55 |
SELECT * FROM t1; |
| 56 |
|
| 57 |
--connection node_3 |
| 58 |
SELECT * FROM t1; |
| 59 |
|
| 60 |
DROP TABLE t1; |
| 61 |
|
| 62 |
--connection node_1 |
| 63 |
CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); |
| 64 |
CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno "); |
| 65 |
|
| 66 |
--connection node_2 |
| 67 |
CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); |
| 68 |
CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno "); |
| 69 |
|
| 70 |
--connection node_3 |
| 71 |
CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on (.*) is inconsistent with group\\. Leaving cluster\\."); |
| 72 |
CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); |
| 73 |
CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); |
| 74 |
|
| 75 |
--connection node_1 |
| 76 |
# Restore original auto_increment_offset values. |
| 77 |
--source ../galera/include/auto_increment_offset_restore.inc |