Debian Codegraph @

mysql-test/suite/group_replication/r/gr_majority_loss_restart.result

raw
1 include/group_replication.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection server1]
6 [connection server1]
7 set session sql_log_bin=0;
8 call mtr.add_suppression("Old incarnation found while trying to add node*.*");
9 set session sql_log_bin=1;
10 [connection server2]
11 SET SESSION sql_log_bin= 0;
12 call mtr.add_suppression("Timeout on wait for view after joining group");
13 call mtr.add_suppression("read failed");
14 call mtr.add_suppression("The member was unable to join the group. Local port: *.*");
15 call mtr.add_suppression("Error connecting to all peers. Member join failed. Local port: *.*");
16 SET SESSION sql_log_bin= 1;
17
18 ############################################################
19 # 1. Crash server 2.
20 [connection server2]
21 # Kill and restart
22 include/rpl_reconnect.inc
23 [connection server1]
24 include/gr_wait_for_member_state.inc
25
26 ############################################################
27 # 2. Execute a transaction on server 1, which will block
28 # since the group does not have majority.
29 [connection server_1]
30 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY);
31 [connection server1]
32
33 ############################################################
34 # 3. Assert that group is still blocked.
35 include/rpl_gr_wait_for_number_of_members.inc
36 include/assert.inc [server 2 is marked as unreachable]
37
38 ############################################################
39 # 4. Restart server 2 with group_replication_start_on_boot=ON,
40 # server 2 will be refused to join the group.
41 [connection server2]
42 # Kill and restart:--group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS --group_replication_start_on_boot=ON --group-replication-group-name=GROUP_REPLICATION_GROUP_NAME
43 include/rpl_reconnect.inc
44 include/gr_wait_for_member_state.inc
45 [connection server1]
46 include/assert.inc [server 2 is marked as unreachable]
47
48 ############################################################
49 # 5. Unblock group with server1 as a single member.
50 SET GLOBAL group_replication_force_members= "SERVER1_ADDRESS";
51
52 ############################################################
53 # 6. Check that statement did unblock and was applied on
54 # server1.
55 [connection server_1]
56 [connection server1]
57
58 ############################################################
59 # 7. Rejoin server2
60 [connection server2]
61 include/stop_group_replication.inc
62 include/start_group_replication.inc
63
64 ############################################################
65 # 8. Execute a transaction on both members.
66 [connection server1]
67 INSERT INTO t1 VALUES (1);
68 [connection server2]
69 INSERT INTO t1 VALUES (2);
70 include/rpl_sync.inc
71
72 ############################################################
73 # 9. Validate data.
74 [connection server1]
75 include/assert.inc ['There are two values in table t1']
76 include/show_binlog_events.inc
77 Log_name Pos Event_type Server_id End_log_pos Info
78 server-binary-log.000001 # Query # # BEGIN
79 server-binary-log.000001 # Query # # COMMIT
80 server-binary-log.000001 # Query # # BEGIN
81 server-binary-log.000001 # Query # # COMMIT
82 server-binary-log.000001 # Query # # use `test`; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY)
83 server-binary-log.000001 # Query # # BEGIN
84 server-binary-log.000001 # Query # # COMMIT
85 server-binary-log.000001 # Query # # BEGIN
86 server-binary-log.000001 # Table_map # # table_id: # (test.t1)
87 server-binary-log.000001 # Write_rows # # table_id: # flags: STMT_END_F
88 server-binary-log.000001 # Xid # # COMMIT /* XID */
89 server-binary-log.000001 # Query # # BEGIN
90 server-binary-log.000001 # Table_map # # table_id: # (test.t1)
91 server-binary-log.000001 # Write_rows # # table_id: # flags: STMT_END_F
92 server-binary-log.000001 # Xid # # COMMIT /* XID */
93 [connection server2]
94 include/assert.inc ['There are two values in table t1']
95 include/show_binlog_events.inc
96 Log_name Pos Event_type Server_id End_log_pos Info
97 server-binary-log.000003 # Query # # use `test`; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY)
98 server-binary-log.000003 # Query # # BEGIN
99 server-binary-log.000003 # Query # # COMMIT
100 server-binary-log.000003 # Query # # BEGIN
101 server-binary-log.000003 # Table_map # # table_id: # (test.t1)
102 server-binary-log.000003 # Write_rows # # table_id: # flags: STMT_END_F
103 server-binary-log.000003 # Xid # # COMMIT /* XID */
104 server-binary-log.000003 # Query # # BEGIN
105 server-binary-log.000003 # Table_map # # table_id: # (test.t1)
106 server-binary-log.000003 # Write_rows # # table_id: # flags: STMT_END_F
107 server-binary-log.000003 # Xid # # COMMIT /* XID */
108 include/diff_tables.inc [server1:test.t1, server2:test.t1]
109
110 ############################################################
111 # 10. Clean up.
112 DROP TABLE t1;
113 include/group_replication_end.inc