Debian Codegraph @

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

raw
1 include/rpl_init.inc [topology=1->2, 1->3, 1->4]
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 [connection server_1]
12 CALL mtr.add_suppression("Semi-sync source failed on net_flush().*");
13 ####################################################################
14 # Test Case: semisync master can be enabled and disabled sucessfully
15 # without any live slave connection and also test ON, OFF can be set
16 # more than once without problems.
17 ####################################################################
18 include/install_semisync_source.inc
19 SET GLOBAL rpl_semi_sync_source_enabled= ON;
20 SET GLOBAL rpl_semi_sync_source_enabled= ON;
21 SET GLOBAL rpl_semi_sync_source_enabled= OFF;
22 SET GLOBAL rpl_semi_sync_source_enabled= OFF;
23 ####################################################################
24 # Test Case: Semisync should work even semisync slaves are connected
25 # before semisync master enabled.
26 ####################################################################
27 CREATE TABLE t1(c1 INT) ENGINE=InnoDB;
28 include/rpl_sync.inc
29 [connection server_2]
30 include/install_semisync_replica.inc
31 [connection server_1]
32 SET GLOBAL rpl_semi_sync_source_enabled= ON;
33 [connection server_1]
34 INSERT INTO t1 VALUES(1);
35 INSERT INTO t1 VALUES(2);
36 INSERT INTO t1 VALUES(3);
37 TRUNCATE t1;
38 include/assert.inc [rpl_semi_sync_source_yes_tx increases 4]
39 include/rpl_sync.inc
40 ####################################################################
41 # Test Case: Semisync should work when more than one semisync slaves
42 # connectted.
43 ####################################################################
44 [connection server_3]
45 include/install_semisync_replica.inc
46 [connection server_1]
47 INSERT INTO t1 VALUES(1);
48 INSERT INTO t1 VALUES(2);
49 INSERT INTO t1 VALUES(3);
50 TRUNCATE t1;
51 include/assert.inc [rpl_semi_sync_source_yes_tx increases 4]
52 include/rpl_sync.inc
53 [connection server_4]
54 include/install_semisync_replica.inc
55 [connection server_1]
56 INSERT INTO t1 VALUES(1);
57 INSERT INTO t1 VALUES(2);
58 INSERT INTO t1 VALUES(3);
59 TRUNCATE t1;
60 include/assert.inc [rpl_semi_sync_source_yes_tx increases 4]
61 include/rpl_sync.inc
62 ###################################################################
63 # Test Case: Semisync should work after semisync master is disabled
64 # and enabled again.
65 ###################################################################
66 [connection server_1]
67 SET GLOBAL rpl_semi_sync_source_enabled= OFF;
68 INSERT INTO t1 VALUES(0);
69 SET GLOBAL rpl_semi_sync_source_enabled= ON;
70 [connection server_1]
71 INSERT INTO t1 VALUES(1);
72 INSERT INTO t1 VALUES(2);
73 INSERT INTO t1 VALUES(3);
74 TRUNCATE t1;
75 include/assert.inc [rpl_semi_sync_source_yes_tx increases 4]
76 include/rpl_sync.inc
77 ###################################################################
78 # Test Case: Semisync should still work after some semisync slaves
79 # reconnected
80 ###################################################################
81 [connection server_2]
82 include/stop_slave_io.inc
83 include/start_slave_io.inc
84 [connection server_1]
85 INSERT INTO t1 VALUES(1);
86 INSERT INTO t1 VALUES(2);
87 INSERT INTO t1 VALUES(3);
88 TRUNCATE t1;
89 include/assert.inc [rpl_semi_sync_source_yes_tx increases 4]
90 include/rpl_sync.inc
91 [connection server_3]
92 include/stop_slave_io.inc
93 include/start_slave_io.inc
94 [connection server_1]
95 INSERT INTO t1 VALUES(1);
96 INSERT INTO t1 VALUES(2);
97 INSERT INTO t1 VALUES(3);
98 TRUNCATE t1;
99 include/assert.inc [rpl_semi_sync_source_yes_tx increases 4]
100 include/rpl_sync.inc
101 ###################################################################
102 # Test Case: Semisync should still work after some semisync slaves
103 # disconnected
104 ###################################################################
105 [connection server_2]
106 include/uninstall_semisync_replica.inc
107 [connection server_1]
108 INSERT INTO t1 VALUES(1);
109 INSERT INTO t1 VALUES(2);
110 INSERT INTO t1 VALUES(3);
111 TRUNCATE t1;
112 include/assert.inc [rpl_semi_sync_source_yes_tx increases 4]
113 include/rpl_sync.inc
114 [connection server_3]
115 include/uninstall_semisync_replica.inc
116 [connection server_1]
117 INSERT INTO t1 VALUES(1);
118 INSERT INTO t1 VALUES(2);
119 INSERT INTO t1 VALUES(3);
120 TRUNCATE t1;
121 include/assert.inc [rpl_semi_sync_source_yes_tx increases 4]
122 include/rpl_sync.inc
123 #####################################################################
124 # Test Case: PS threads table includes ACK thread's status correctly.
125 #####################################################################
126 #
127 # Status: Waiting for semi-sync ACK from replica
128 #
129 [connection server_1]
130 SELECT name, type, processlist_state FROM performance_schema.threads
131 WHERE name LIKE "%Ack_receiver";
132 name type processlist_state
133 thread/semisync/Ack_receiver BACKGROUND Waiting for semi-sync ACK from replica
134 #
135 # Coverage Test:
136 # It should print an error to log if select() function returns -1
137 #
138 SET @save_debug = @@GLOBAL.debug;
139 SET GLOBAL debug = '+d,rpl_semisync_simulate_select_error';
140 INSERT INTO t1 VALUES(1);
141 SET GLOBAL debug = @save_debug;
142 #
143 # Status: Waiting for semisync slave to connect
144 #
145 [connection server_4]
146 include/uninstall_semisync_replica.inc
147 [connection server_1]
148 CALL mtr.add_suppression("Timeout waiting for reply of binlog.*");
149 INSERT INTO t1 VALUES(1);
150 [connection server_4]
151 [connection server_1]
152 SELECT name, type, processlist_state FROM performance_schema.threads
153 WHERE name LIKE "%Ack_receiver";
154 name type processlist_state
155 thread/semisync/Ack_receiver BACKGROUND Waiting for semi-sync replica connection
156 #
157 # Ack thread is stopped, it should be not in PS.threads table.
158 #
159 SET GLOBAL rpl_semi_sync_source_enabled= OFF;
160 include/assert.inc [ack receiver thread is destroied]
161 ############################################
162 # Test Case: Coverage test on error branches
163 ############################################
164 SET @save_debug = @@GLOBAL.debug;
165 CALL mtr.add_suppression("Failed to start semi-sync ACK receiver thread.*");
166 CALL mtr.add_suppression("Failed to register replica to semi-sync ACK receiver thread.*");
167 CALL mtr.add_suppression("Failed to stop ack receiver thread on my_thread_join.*");
168 CALL mtr.add_suppression("Run function 'transmit_start' .* failed");
169 SET GLOBAL rpl_semi_sync_source_trace_level = 255;
170 #
171 # Failure on creating ack receiver thread
172 #
173 SET GLOBAL debug = '+d,rpl_semisync_simulate_create_thread_failure';
174 SET GLOBAL rpl_semi_sync_source_enabled= ON;
175 include/assert.inc [ should be 0]
176 include/assert.inc [ack receiver thread is destroied;]
177 #
178 # Failure on stopping ack receive thread
179 #
180 SET GLOBAL debug= @save_debug;
181 SET GLOBAL rpl_semi_sync_source_enabled= ON;
182 SET GLOBAL debug= '+d,rpl_semisync_simulate_thread_join_failure';
183 SET GLOBAL rpl_semi_sync_source_enabled= OFF;
184 include/assert.inc [ should be 0]
185 include/assert.inc [ack receiver thread is destroied]
186 #
187 # Failure on registering semisync slave
188 #
189 SET GLOBAL debug= '-d,rpl_semisync_simulate_thread_join_failure';
190 SET GLOBAL debug= '+d,rpl_semisync_simulate_add_replica_failure';
191 SET GLOBAL rpl_semi_sync_source_enabled= ON;
192 [connection server_2]
193 include/stop_slave.inc
194 CHANGE REPLICATION SOURCE TO SOURCE_RETRY_COUNT = 1, SOURCE_CONNECT_RETRY = 5;
195 SET @save_debug= @@GLOBAL.debug;
196 SET GLOBAL debug= '+d,dbug.before_get_SOURCE_UUID';
197 include/install_semisync_replica.inc
198 Warnings:
199 Note 3084 Replication thread(s) for channel '' are already stopped.
200 SET GLOBAL debug= @save_debug;
201 SET debug_sync= 'now SIGNAL signal.get_source_uuid';
202 include/wait_for_slave_io_to_stop.inc
203 CHANGE REPLICATION SOURCE TO SOURCE_RETRY_COUNT = 10,
204 SOURCE_CONNECT_RETRY = 1;
205 include/uninstall_semisync_replica.inc
206 Warnings:
207 Note 3084 Replication thread(s) for channel '' are already stopped.
208 include/start_slave_sql.inc
209 [connection server_1]
210 DROP TABLE t1;
211 include/rpl_sync.inc
212 SET GLOBAL debug= @save_debug;
213 include/uninstall_semisync_source.inc
214 include/rpl_end.inc