Debian Codegraph @

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

raw
1 include/group_replication.inc [rpl_server_count=3]
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
7 ############################################################
8 # 01. Increase the expel timeout.
9 [connection server1]
10 SET GLOBAL group_replication_member_expel_timeout = 300;
11 SELECT @@GLOBAL.group_replication_member_expel_timeout;
12 @@GLOBAL.group_replication_member_expel_timeout
13 300
14 [connection server2]
15 SET GLOBAL group_replication_member_expel_timeout = 300;
16 SELECT @@GLOBAL.group_replication_member_expel_timeout;
17 @@GLOBAL.group_replication_member_expel_timeout
18 300
19 [connection server3]
20 SET GLOBAL group_replication_member_expel_timeout = 300;
21 SELECT @@GLOBAL.group_replication_member_expel_timeout;
22 @@GLOBAL.group_replication_member_expel_timeout
23 300
24 SET SESSION sql_log_bin = 0;
25 CREATE TABLE pid_table(pid_no INT PRIMARY KEY);
26 LOAD DATA LOCAL INFILE 'pid_file' INTO TABLE pid_table;
27 DROP TABLE pid_table;
28 SET SESSION sql_log_bin = 1;
29
30 ############################################################
31 # 02. Create a table on the group.
32 [connection server1]
33 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY);
34 [connection server1]
35 [connection server2]
36 [connection server3]
37
38 ############################################################
39 # 03. Make server 3 block before send its prepare message.
40 # This will allow us to deterministically make it
41 # UNREACHABLE while others are waiting for its acknowledge.
42 [connection server3]
43 SET @@GLOBAL.DEBUG= '+d,group_replication_wait_before_message_send_after_applier_prepare';
44
45 ############################################################
46 # 04. Execute T1 on server1.
47 [connection server1]
48 INSERT INTO t1 VALUES (1);
49
50 ############################################################
51 # 05. Wait until T1 is prepared on server3.
52 [connection server3]
53 SET DEBUG_SYNC= "now WAIT_FOR signal.after_before_message_send_after_applier_prepare_waiting";
54
55 ############################################################
56 # 06. Make server 3 UNREACHABLE.
57 [connection server_3]
58 [connection server_1]
59 include/gr_wait_for_member_state.inc
60 [connection server2]
61 include/gr_wait_for_member_state.inc
62
63 ############################################################
64 # 07. server 1 and 2 are waiting for the acknowledges, they
65 # will not proceed until server3 acknowledges or leaves
66 # the group.
67 [connection server_1]
68 [connection server2]
69
70 ############################################################
71 # 08. Make server 3 ONLINE.
72 [connection server_3]
73 [connection server_1]
74 include/gr_wait_for_member_state.inc
75 [connection server2]
76 include/gr_wait_for_member_state.inc
77
78 ############################################################
79 # 09. Unblock T1 prepare on server3.
80 [connection server3]
81 SET DEBUG_SYNC= 'now SIGNAL signal.after_before_message_send_after_applier_prepare_continue';
82 SET @@GLOBAL.DEBUG= '-d,group_replication_wait_before_message_send_after_applier_prepare';
83
84 ############################################################
85 # 10. T1 is committed on all servers.
86 [connection server1]
87 include/assert.inc ['There is 1 value in table t1']
88 [connection server2]
89 include/assert.inc ['There is 1 value in table t1']
90 [connection server3]
91 include/assert.inc ['There is 1 value in table t1']
92 include/diff_tables.inc [server1:t1, server2:t1, server3:t1]
93
94 ############################################################
95 # 11. Clean up.
96 [connection server1]
97 DROP TABLE t1;
98 include/group_replication_end.inc