Debian Codegraph @

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

raw
1 [connection server1]
2 [connection server2]
3 [connection server3]
4 [connection server4]
5 [connection server5]
6 [connection server1]
7
8 ############################################################
9 # 1. Create a group with 5 members and a table on it.
10 include/group_replication.inc [rpl_server_count=5]
11 Warnings:
12 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
13 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.
14 [connection server1]
15 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
16 include/rpl_sync.inc
17
18 ############################################################
19 # 2. Crash three members.
20 [connection server3]
21 [connection server4]
22 [connection server5]
23 [connection server1]
24 include/gr_wait_for_member_state.inc
25 member5 @ server1 is marked as UNREACHABLE
26 include/gr_wait_for_member_state.inc
27 member4 @ server1 is marked as UNREACHABLE
28 include/gr_wait_for_member_state.inc
29 member3 @ server1 is marked as UNREACHABLE
30 [connection server2]
31 include/gr_wait_for_member_state.inc
32 member5 @ server2 is marked as UNREACHABLE
33 include/gr_wait_for_member_state.inc
34 member4 @ server2 is marked as UNREACHABLE
35 include/gr_wait_for_member_state.inc
36 member3 @ server2 is marked as UNREACHABLE
37 [connection server_2]
38 INSERT INTO t1 VALUES (2);
39
40 ############################################################
41 # 3. Unblock the group with the alive members: server 1 and 2.
42 [connection server1]
43 include/assert.inc [group_replication_force_members is correct]
44
45 ############################################################
46 # 4. Assert that group has 2 members: server 1 and 2.
47 [connection server1]
48 include/rpl_gr_wait_for_number_of_members.inc
49 include/assert.inc [Server 1 must be present on group members]
50 include/assert.inc [Server 2 must be present on group members]
51 include/assert.inc [The value of view_id must be random:6]
52 [connection server2]
53 include/rpl_gr_wait_for_number_of_members.inc
54 include/assert.inc [Server 1 must be present on group members]
55 include/assert.inc [Server 2 must be present on group members]
56 include/assert.inc [The value of view_id must be random:6]
57
58 ############################################################
59 # 5. Execute a transaction in order to prove liveness and
60 # assert that the blocked transaction was replicated in
61 # the new configuration.
62 [connection server_2]
63 [connection server1]
64 INSERT INTO t1 VALUES (1);
65 include/sync_slave_sql_with_master.inc
66 include/assert.inc ['There are two values in table t1']
67 include/diff_tables.inc [server1:test.t1, server2:test.t1]
68
69 ############################################################
70 # 6. Clean up.
71 [connection server_3]
72 include/rpl_reconnect.inc
73 include/assert.inc ['There are no values in table t1']
74 DROP TABLE t1;
75 [connection server_4]
76 include/rpl_reconnect.inc
77 include/assert.inc ['There are no values in table t1']
78 DROP TABLE t1;
79 [connection server_5]
80 include/rpl_reconnect.inc
81 include/assert.inc ['There are no values in table t1']
82 DROP TABLE t1;
83 [connection server1]
84 DROP TABLE t1;
85 set session sql_log_bin=0;
86 call mtr.add_suppression("The member lost contact with a majority of the members in the group. Until the network is restored.*");
87 call mtr.add_suppression("The member resumed contact with a majority of the members in the group.*");
88 set session sql_log_bin=1;
89 [connection server2]
90 set session sql_log_bin=0;
91 call mtr.add_suppression("The member lost contact with a majority of the members in the group. Until the network is restored.*");
92 call mtr.add_suppression("The member resumed contact with a majority of the members in the group.*");
93 set session sql_log_bin=1;
94 [connection server4]
95 [connection server5]
96 include/group_replication_end.inc