Debian Codegraph @

mysql-test/suite/binlog_encryption/rpl_binlog_errors.result

raw
1 include/master-slave.inc
2 [connection master]
3 #######################################################################
4 ####################### PART 1: MASTER TESTS ##########################
5 #######################################################################
6 connection slave;
7 include/stop_slave.inc
8 connection master;
9 call mtr.add_suppression("Can't generate a unique log-filename");
10 call mtr.add_suppression("Writing one row to the row-based binary log failed.*");
11 call mtr.add_suppression("Error writing file .*");
12 call mtr.add_suppression("Could not use master-bin for logging");
13 SET @old_debug= @@global.debug_dbug;
14 SELECT repeat('x',8192) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data';
15 SELECT repeat('x',10) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data';
16 RESET MASTER;
17 ###################### TEST #1
18 FLUSH LOGS;
19 # assert: must show two binlogs
20 show binary logs;
21 Log_name File_size
22 master-bin.000001 #
23 master-bin.000002 #
24 ###################### TEST #2
25 RESET MASTER;
26 SET @@global.debug_dbug="d,error_unique_log_filename";
27 FLUSH LOGS;
28 ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
29 # assert: must show one binlog
30 show binary logs;
31 Log_name File_size
32 master-bin.000001 #
33 SET @@global.debug_dbug=@old_debug;
34 RESET MASTER;
35 ###################### TEST #3
36 CREATE TABLE t1 (a INT);
37 CREATE TABLE t2 (a VARCHAR(16384)) Engine=InnoDB CHARSET=latin1;
38 CREATE TABLE t4 (a VARCHAR(16384)) CHARSET=latin1;
39 INSERT INTO t1 VALUES (1);
40 RESET MASTER;
41 LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
42 # assert: must show two binlog
43 show binary logs;
44 Log_name File_size
45 master-bin.000001 #
46 master-bin.000002 #
47 SET @@global.debug_dbug=@old_debug;
48 DELETE FROM t2;
49 RESET MASTER;
50 ###################### TEST #4
51 SET @@global.debug_dbug="d,error_unique_log_filename";
52 LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
53 ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
54 # assert: must show one entry
55 SELECT count(*) FROM t2;
56 count(*)
57 1
58 SET @@global.debug_dbug=@old_debug;
59 DELETE FROM t2;
60 RESET MASTER;
61 ###################### TEST #5
62 SET @@global.debug_dbug="d,error_unique_log_filename";
63 LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data' INTO TABLE t2;
64 # assert: must show one entry
65 SELECT count(*) FROM t2;
66 count(*)
67 1
68 SET @@global.debug_dbug=@old_debug;
69 DELETE FROM t2;
70 RESET MASTER;
71 ###################### TEST #6
72 SET @@global.debug_dbug="d,error_unique_log_filename";
73 SET AUTOCOMMIT=0;
74 INSERT INTO t2 VALUES ('muse');
75 LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
76 INSERT INTO t2 VALUES ('muse');
77 COMMIT;
78 ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
79 # assert: must show three entries
80 SELECT count(*) FROM t2;
81 count(*)
82 3
83 SET AUTOCOMMIT= 1;
84 SET @@global.debug_dbug=@old_debug;
85 DELETE FROM t2;
86 RESET MASTER;
87 ###################### TEST #7
88 SET @@global.debug_dbug="d,error_unique_log_filename";
89 SET @@binlog_annotate_row_events= 0;
90 SELECT count(*) FROM t4;
91 count(*)
92 0
93 LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4;
94 ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
95 # assert: must show 1 entry
96 SELECT count(*) FROM t4;
97 count(*)
98 1
99 ### check that the incident event is written to the current log
100 SET @@global.debug_dbug=@old_debug;
101 include/show_binlog_events.inc
102 Log_name Pos Event_type Server_id End_log_pos Info
103 master-bin.000001 # Incident # # #1 (LOST_EVENTS)
104 DELETE FROM t4;
105 RESET MASTER;
106 ###################### TEST #8
107 SET @@global.debug_dbug="d,error_unique_log_filename";
108 # must show 0 entries
109 SELECT count(*) FROM t4;
110 count(*)
111 0
112 SELECT count(*) FROM t2;
113 count(*)
114 0
115 LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t4;
116 ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
117 LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data' INTO TABLE t2;
118 ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
119 INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc');
120 ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
121 # INFO: Count(*) Before Offending DELETEs
122 # assert: must show 1 entry
123 SELECT count(*) FROM t4;
124 count(*)
125 1
126 # assert: must show 4 entries
127 SELECT count(*) FROM t2;
128 count(*)
129 4
130 DELETE FROM t4;
131 ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
132 DELETE FROM t2;
133 ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
134 # INFO: Count(*) After Offending DELETEs
135 # assert: must show zero entries
136 SELECT count(*) FROM t4;
137 count(*)
138 0
139 SELECT count(*) FROM t2;
140 count(*)
141 0
142 SET @@global.debug_dbug=@old_debug;
143 ###################### TEST #9
144 SET @@global.debug_dbug="d,error_unique_log_filename";
145 SET SQL_LOG_BIN=0;
146 INSERT INTO t2 VALUES ('aaa'), ('bbb'), ('ccc'), ('ddd');
147 INSERT INTO t4 VALUES ('eee'), ('fff'), ('ggg'), ('hhh');
148 # assert: must show four entries
149 SELECT count(*) FROM t2;
150 count(*)
151 4
152 SELECT count(*) FROM t4;
153 count(*)
154 4
155 DELETE FROM t2;
156 DELETE FROM t4;
157 # assert: must show zero entries
158 SELECT count(*) FROM t2;
159 count(*)
160 0
161 SELECT count(*) FROM t4;
162 count(*)
163 0
164 SET SQL_LOG_BIN=1;
165 SET @@global.debug_dbug=@old_debug;
166 ###################### TEST #10
167 call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file.");
168 call mtr.add_suppression("Could not use .*");
169 RESET MASTER;
170 SHOW WARNINGS;
171 Level Code Message
172 SET @@global.debug_dbug="d,fault_injection_registering_index";
173 FLUSH LOGS;
174 ERROR HY000: Can't open file: 'master-bin.000002' (errno: 1 "Operation not permitted")
175 SET @@global.debug_dbug=@old_debug;
176 SHOW BINARY LOGS;
177 ERROR HY000: You are not using binary logging
178 CREATE TABLE t5 (a INT);
179 INSERT INTO t4 VALUES ('bbbbb');
180 INSERT INTO t2 VALUES ('aaaaa');
181 DELETE FROM t4;
182 DELETE FROM t2;
183 DROP TABLE t5;
184 flush tables;
185 ###################### TEST #11
186 include/rpl_restart_server.inc [server_number=1]
187 SET @@global.debug_dbug="d,fault_injection_openning_index";
188 FLUSH LOGS;
189 ERROR HY000: Can't open file: 'master-bin.index' (errno: 1 "Operation not permitted")
190 SET @@global.debug_dbug=@old_debug;
191 RESET MASTER;
192 ERROR HY000: Binlog closed, cannot RESET MASTER
193 CREATE TABLE t5 (a INT);
194 INSERT INTO t4 VALUES ('bbbbb');
195 INSERT INTO t2 VALUES ('aaaaa');
196 DELETE FROM t4;
197 DELETE FROM t2;
198 DROP TABLE t5;
199 flush tables;
200 include/rpl_restart_server.inc [server_number=1]
201 ###################### TEST #12
202 SET @@global.debug_dbug="d,fault_injection_new_file_rotate_event";
203 FLUSH LOGS;
204 ERROR HY000: Can't open file: 'master-bin' (errno: 2 "No such file or directory")
205 SET @@global.debug_dbug=@old_debug;
206 RESET MASTER;
207 ERROR HY000: Binlog closed, cannot RESET MASTER
208 CREATE TABLE t5 (a INT);
209 INSERT INTO t4 VALUES ('bbbbb');
210 INSERT INTO t2 VALUES ('aaaaa');
211 DELETE FROM t4;
212 DELETE FROM t2;
213 DROP TABLE t5;
214 flush tables;
215 include/rpl_restart_server.inc [server_number=1]
216 DROP TABLE t1, t2, t4;
217 RESET MASTER;
218 connection slave;
219 include/start_slave.inc
220 connection master;
221 #######################################################################
222 ####################### PART 2: SLAVE TESTS ###########################
223 #######################################################################
224 include/rpl_reset.inc
225 connection slave;
226 include/stop_slave.inc
227 CHANGE MASTER TO MASTER_USE_GTID=NO;
228 include/start_slave.inc
229 call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");
230 call mtr.add_suppression("Error writing file .*");
231 call mtr.add_suppression("Could not use .*");
232 call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file.");
233 call mtr.add_suppression("Can't generate a unique log-filename .*");
234 ###################### TEST #13
235 SET @saved_debug=@@global.debug_dbug;
236 include/stop_slave.inc
237 SET @@global.debug_dbug="d,error_unique_log_filename";
238 START SLAVE io_thread;
239 include/wait_for_slave_io_error.inc [errno=1595]
240 Last_IO_Error = 'Relay log write failure: could not queue event from master'
241 SET @@global.debug_dbug=@saved_debug;
242 include/rpl_restart_server.inc [server_number=2]
243 ###################### TEST #14
244 SET @saved_debug=@@global.debug_dbug;
245 include/stop_slave.inc
246 SET @@global.debug_dbug="d,fault_injection_new_file_rotate_event";
247 START SLAVE io_thread;
248 include/wait_for_slave_io_error.inc [errno=1595]
249 Last_IO_Error = 'Relay log write failure: could not queue event from master'
250 SET @@global.debug_dbug=@saved_debug;
251 include/rpl_restart_server.inc [server_number=2]
252 ###################### TEST #15
253 SET @saved_debug=@@global.debug_dbug;
254 include/stop_slave.inc
255 SET @@global.debug_dbug="d,fault_injection_registering_index";
256 START SLAVE io_thread;
257 include/wait_for_slave_io_error.inc [errno=1595]
258 Last_IO_Error = 'Relay log write failure: could not queue event from master'
259 SET @@global.debug_dbug=@saved_debug;
260 include/rpl_restart_server.inc [server_number=2]
261 ###################### TEST #16
262 SET @saved_debug=@@global.debug_dbug;
263 include/stop_slave.inc
264 SET @@global.debug_dbug="d,fault_injection_openning_index";
265 START SLAVE io_thread;
266 include/wait_for_slave_io_error.inc [errno=1595]
267 Last_IO_Error = 'Relay log write failure: could not queue event from master'
268 SET @@global.debug_dbug=@saved_debug;
269 include/rpl_restart_server.inc [server_number=2]
270 include/stop_slave_sql.inc
271 Warnings:
272 Note 1255 Slave already has been stopped
273 RESET SLAVE;
274 Warnings:
275 Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
276 RESET MASTER;
277 include/rpl_end.inc