Debian Codegraph @

mysql-test/suite/rpl_nogtid/r/rpl_semi_sync_wait_slave_count.result

raw
1 include/rpl_init.inc [topology=1->2, 1->3, 1->4, 1->5]
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 Warnings:
6 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
7 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.
8 Warnings:
9 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
10 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.
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 CREATE TABLE t1(c1 INT);
15 include/rpl_sync.inc
16 [connection server_1]
17 include/install_semisync_source.inc
18 SET GLOBAL rpl_semi_sync_source_trace_level= 255;
19 ####################################################################
20 # Test Case: Wait ack from 1 slave, but no semisync slave is enabled
21 ####################################################################
22 SET GLOBAL rpl_semi_sync_source_timeout=3000;
23 INSERT INTO t1 VALUES(1);
24 include/assert.inc [rpl_semi_sync_source_yes_tx should be 0 + 0]
25 include/assert.inc [rpl_semi_sync_source_no_tx should be 0 + 1]
26 ###################################################################
27 # Test Case: Wait ack from 1 slave, and 1 semisync slave is enabled
28 ###################################################################
29 [connection server_2]
30 include/install_semisync_replica.inc
31 [connection server_1]
32 SET GLOBAL rpl_semi_sync_source_timeout=100000;
33 INSERT INTO t1 VALUES(3);
34 INSERT INTO t1 VALUES(4);
35 include/assert.inc [rpl_semi_sync_source_yes_tx should be 0 + 2]
36 include/assert.inc [rpl_semi_sync_source_no_tx should be 1 + 0]
37 #########################################################################
38 # Test Case: Wait ack from 2 slaves, but only 1 semisync slave is enabled
39 #########################################################################
40 SET GLOBAL rpl_semi_sync_source_wait_for_replica_count = 2;
41 SET GLOBAL rpl_semi_sync_source_timeout=3000;
42 INSERT INTO t1 VALUES(10);
43 include/assert.inc [rpl_semi_sync_source_yes_tx should be 2 + 0]
44 include/assert.inc [rpl_semi_sync_source_no_tx should be 1 + 1]
45 #####################################################################
46 # Test Case: Wait ack from 2 slaves, and 2 semisync slave are enabled
47 #####################################################################
48 [connection server_3]
49 include/install_semisync_replica.inc
50 [connection server_1]
51 SET GLOBAL rpl_semi_sync_source_timeout = 100000;
52 INSERT INTO t1 VALUES(102);
53 INSERT INTO t1 VALUES(103);
54 include/assert.inc [rpl_semi_sync_source_yes_tx should be 2 + 2]
55 include/assert.inc [rpl_semi_sync_source_no_tx should be 2 + 0]
56 ##########################################################################
57 # Test Case: Wait ack from 3 slaves, but only 2 semisync slave are enabled
58 ##########################################################################
59 SET GLOBAL rpl_semi_sync_source_wait_for_replica_count = 3;
60 SET GLOBAL rpl_semi_sync_source_timeout = 3000;
61 INSERT INTO t1 VALUES(100);
62 INSERT INTO t1 VALUES(101);
63 include/assert.inc [rpl_semi_sync_source_yes_tx should be 4 + 0]
64 include/assert.inc [rpl_semi_sync_source_no_tx should be 2 + 2]
65 ######################################################################
66 # Test Case: Wait ack from 3 slaves, and 3 semisync slaves are enabled
67 ######################################################################
68 [connection server_4]
69 include/install_semisync_replica.inc
70 [connection server_1]
71 SET GLOBAL rpl_semi_sync_source_timeout = 100000;
72 INSERT INTO t1 VALUES(102);
73 INSERT INTO t1 VALUES(103);
74 include/assert.inc [rpl_semi_sync_source_yes_tx should be 4 + 2]
75 include/assert.inc [rpl_semi_sync_source_no_tx should be 4 + 0]
76 ######################################################################
77 # Test Case: Verify only the transaction before replied ack position
78 # can stop waiting and go ahead.
79 ######################################################################
80 [connection server_4]
81 SET @original_debug = @@GLOBAL.debug;
82 SET GLOBAL debug = '+d,rpl_semisync_before_send_ack';
83 [connection default]
84 INSERT INTO t1 VALUES(104);
85 [connection server_2]
86 [connection server_1]
87 INSERT INTO t1 VALUES(105);
88 [connection server_2]
89 [connection server_3]
90 [connection server_4]
91 SET DEBUG_SYNC = 'now SIGNAL continue';
92 [connection default]
93 include/assert.inc [rpl_semi_sync_source_yes_tx should be 6 + 1]
94 include/assert.inc [rpl_semi_sync_source_no_tx should be 4 + 0]
95 [connection server_4]
96 SET DEBUG_SYNC = 'now SIGNAL continue';
97 [connection server_1]
98 include/assert.inc [rpl_semi_sync_source_yes_tx should be 7 + 1]
99 include/assert.inc [rpl_semi_sync_source_no_tx should be 4 + 0]
100 ######################################################################
101 # Test Case: Coverage test, it covers the branch that coming ack is
102 # greater than the acked already received.
103 ######################################################################
104 [connection server_1]
105 INSERT INTO t1 VALUES(130);;
106 [connection server_2]
107 SET @original_debug = @@GLOBAL.debug;
108 SET GLOBAL debug = '+d,rpl_semisync_before_send_ack';
109 [connection server_3]
110 SET @original_debug = @@GLOBAL.debug;
111 SET GLOBAL debug = '+d,rpl_semisync_before_send_ack';
112 [connection default]
113 INSERT INTO t1 VALUES(131);;
114 [connection server_5]
115 include/install_semisync_replica.inc
116 [connection server_1]
117 include/assert.inc [rpl_semi_sync_source_yes_tx should be 8 + 1]
118 include/assert.inc [rpl_semi_sync_source_no_tx should be 4 + 0]
119 [connection server_2]
120 SET GLOBAL debug = @original_debug;
121 SET DEBUG_SYNC= 'now SIGNAL continue';
122 [connection server_3]
123 SET GLOBAL debug = @original_debug;
124 SET DEBUG_SYNC= 'now SIGNAL continue';
125 [connection server_4]
126 SET GLOBAL debug = @original_debug;
127 SET DEBUG_SYNC= 'now SIGNAL continue';
128 [connection default]
129 include/assert.inc [rpl_semi_sync_source_yes_tx should be 9 + 1]
130 include/assert.inc [rpl_semi_sync_source_no_tx should be 4 + 0]
131 ######################################################################
132 # Test Case: Verify it can work well when number of semisync slaves
133 # is greater than rpl_semi_sync_source_wait_for_replica_count
134 ######################################################################
135 [connection server_1]
136 SET GLOBAL rpl_semi_sync_source_wait_for_replica_count = 2;
137 INSERT INTO t1 VALUES(106);
138 INSERT INTO t1 VALUES(107);
139 include/rpl_sync.inc
140 include/assert.inc [rpl_semi_sync_source_yes_tx should be 10 + 2]
141 include/assert.inc [rpl_semi_sync_source_no_tx should be 4 + 0]
142 SET GLOBAL rpl_semi_sync_source_wait_for_replica_count = 4;
143 INSERT INTO t1 VALUES(108);
144 INSERT INTO t1 VALUES(109);
145 include/assert.inc [rpl_semi_sync_source_yes_tx should be 12 + 2]
146 include/assert.inc [rpl_semi_sync_source_no_tx should be 4 + 0]
147 ######################################################################
148 # Test Case: It should still keep the old value and works well when
149 # setting rpl_semi_sync_source_wait_for_replica_count fails
150 ######################################################################
151 SET @original_debug = @@GLOBAL.debug;
152 SET GLOBAL debug = '+d,rpl_semisync_simulate_allocate_ack_container_failure';
153 SET GLOBAL rpl_semi_sync_source_wait_for_replica_count = 2;
154 include/assert.inc [ should be 4]
155 INSERT INTO t1 VALUES(110);
156 INSERT INTO t1 VALUES(111);
157 include/assert.inc [rpl_semi_sync_source_yes_tx should be 14 + 2]
158 include/assert.inc [rpl_semi_sync_source_no_tx should be 4 + 0]
159 SET GLOBAL rpl_semi_sync_source_wait_for_replica_count = 5;
160 include/assert.inc [ should be 4]
161 INSERT INTO t1 VALUES(112);
162 INSERT INTO t1 VALUES(113);
163 include/assert.inc [rpl_semi_sync_source_yes_tx should be 16 + 2]
164 include/assert.inc [rpl_semi_sync_source_no_tx should be 4 + 0]
165 SET GLOBAL debug = @original_debug;
166 ########################################################################
167 # Test Case: Verify it works well when some semisync slaves shutdown and
168 # rpl_semi_sync_source_wait_for_replica_count is decreased.
169 ########################################################################
170 SET GLOBAL rpl_semi_sync_source_wait_no_replica = 1;
171 SET GLOBAL rpl_semi_sync_source_timeout = 90000000;
172 [connection server_5]
173 include/uninstall_semisync_replica.inc
174 [connection server_4]
175 include/uninstall_semisync_replica.inc
176 [connection default]
177 INSERT INTO t1 VALUES(201);
178 [connection server_1]
179 include/rpl_sync.inc
180 SET GLOBAL rpl_semi_sync_source_wait_for_replica_count = 2;
181 [connection default]
182 include/assert.inc [rpl_semi_sync_source_yes_tx should be 18 + 1]
183 include/assert.inc [rpl_semi_sync_source_no_tx should be 4 + 0]
184 [connection server_3]
185 include/uninstall_semisync_replica.inc
186 [connection default]
187 INSERT INTO t1 VALUES(202);
188 [connection server_1]
189 include/rpl_sync.inc
190 SET GLOBAL rpl_semi_sync_source_wait_for_replica_count = 1;
191 [connection default]
192 include/assert.inc [rpl_semi_sync_source_yes_tx should be 19 + 1]
193 include/assert.inc [rpl_semi_sync_source_no_tx should be 4 + 0]
194 ########################################################################
195 # Test Case: Verify semisync master will turn off immediately after a
196 # a semisync slave unregistered and there are no enough
197 # semisync slaves
198 ########################################################################
199 SET GLOBAL rpl_semi_sync_source_wait_no_replica = 0;
200 [connection server_2]
201 include/uninstall_semisync_replica.inc
202 [connection server_1]
203 ########################################################################
204 # Coverage Test
205 ########################################################################
206 SET GLOBAL rpl_semi_sync_source_wait_for_replica_count = 4;
207 SET GLOBAL rpl_semi_sync_source_wait_for_replica_count = 4;
208 SET GLOBAL rpl_semi_sync_source_enabled= OFF;
209 SET GLOBAL rpl_semi_sync_source_enabled= OFF;
210 SET GLOBAL rpl_semi_sync_source_enabled= ON;
211 include/uninstall_semisync_source.inc
212 [connection server_1]
213 DROP TABLE t1;
214 CALL mtr.add_suppression(".* Timeout waiting for reply of binlog .*");
215 CALL mtr.add_suppression(".* Failed to allocate memory for ack_array .*");
216 include/rpl_end.inc