Skip to content

Commit 78ffeaa

Browse files
committed
Fix that one can run rpl_binlog_errors with --debug
1 parent 05ed9fe commit 78ffeaa

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

mysql-test/suite/rpl/r/rpl_binlog_errors.result

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
2828
show binary logs;
2929
Log_name File_size
3030
master-bin.000001 #
31-
SET GLOBAL debug_dbug="";
31+
SET GLOBAL debug_dbug=@old_debug;
3232
RESET MASTER;
3333
###################### TEST #3
3434
CREATE TABLE t1 (a INT);
@@ -42,7 +42,7 @@ show binary logs;
4242
Log_name File_size
4343
master-bin.000001 #
4444
master-bin.000002 #
45-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
45+
SET GLOBAL debug_dbug=@old_debug;
4646
DELETE FROM t2;
4747
RESET MASTER;
4848
###################### TEST #4
@@ -54,7 +54,7 @@ ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
5454
SELECT count(*) FROM t2;
5555
count(*)
5656
1
57-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
57+
SET GLOBAL debug_dbug=@old_debug;
5858
DELETE FROM t2;
5959
RESET MASTER;
6060
###################### TEST #5
@@ -64,7 +64,7 @@ LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data' INTO TABLE t2;
6464
SELECT count(*) FROM t2;
6565
count(*)
6666
1
67-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
67+
SET GLOBAL debug_dbug=@old_debug;
6868
DELETE FROM t2;
6969
RESET MASTER;
7070
###################### TEST #6
@@ -81,7 +81,7 @@ SELECT count(*) FROM t2;
8181
count(*)
8282
3
8383
SET AUTOCOMMIT= 1;
84-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
84+
SET GLOBAL debug_dbug=@old_debug;
8585
DELETE FROM t2;
8686
RESET MASTER;
8787
###################### TEST #7
@@ -97,7 +97,7 @@ SELECT count(*) FROM t4;
9797
count(*)
9898
1
9999
### check that the incident event is written to the current log
100-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
100+
SET GLOBAL debug_dbug=@old_debug;
101101
include/show_binlog_events.inc
102102
Log_name Pos Event_type Server_id End_log_pos Info
103103
master-bin.000001 # Incident # # #1 (LOST_EVENTS)
@@ -144,7 +144,7 @@ count(*)
144144
SELECT count(*) FROM t2;
145145
count(*)
146146
0
147-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
147+
SET GLOBAL debug_dbug=@old_debug;
148148
###################### TEST #9
149149
SET GLOBAL debug_dbug="+d,error_unique_log_filename";
150150
SET SQL_LOG_BIN=0;
@@ -167,7 +167,7 @@ SELECT count(*) FROM t4;
167167
count(*)
168168
0
169169
SET SQL_LOG_BIN=1;
170-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
170+
SET GLOBAL debug_dbug=@old_debug;
171171
###################### TEST #10
172172
call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file.");
173173
call mtr.add_suppression("Could not open .*");
@@ -215,7 +215,6 @@ DELETE FROM t4;
215215
DELETE FROM t2;
216216
DROP TABLE t5;
217217
include/rpl_restart_server.inc [server_number=1]
218-
SET GLOBAL debug_dbug= @old_debug;
219218
DROP TABLE t1, t2, t4;
220219
RESET MASTER;
221220
include/start_slave.inc
@@ -271,7 +270,6 @@ include/rpl_restart_server.inc [server_number=2]
271270
include/stop_slave_sql.inc
272271
Warnings:
273272
Note 1255 Slave already has been stopped
274-
SET GLOBAL debug_dbug=@old_debug;
275273
RESET SLAVE;
276274
RESET MASTER;
277275
include/rpl_end.inc

mysql-test/suite/rpl/t/rpl_binlog_errors.test

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ FLUSH LOGS;
7575
-- source include/show_binary_logs.inc
7676

7777
### ACTION: clean up and move to next test
78-
SET GLOBAL debug_dbug="";
78+
SET GLOBAL debug_dbug=@old_debug;
7979
RESET MASTER;
8080

8181
-- echo ###################### TEST #3
@@ -100,7 +100,7 @@ RESET MASTER;
100100
-- source include/show_binary_logs.inc
101101

102102
# clean up the table and the binlog to be used in next part of test
103-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
103+
SET GLOBAL debug_dbug=@old_debug;
104104
DELETE FROM t2;
105105
RESET MASTER;
106106

@@ -121,7 +121,7 @@ SET GLOBAL debug_dbug="+d,error_unique_log_filename";
121121
SELECT count(*) FROM t2;
122122

123123
# clean up the table and the binlog to be used in next part of test
124-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
124+
SET GLOBAL debug_dbug=@old_debug;
125125
DELETE FROM t2;
126126
RESET MASTER;
127127

@@ -139,7 +139,7 @@ SET GLOBAL debug_dbug="+d,error_unique_log_filename";
139139
SELECT count(*) FROM t2;
140140

141141
# clean up the table and the binlog to be used in next part of test
142-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
142+
SET GLOBAL debug_dbug=@old_debug;
143143
DELETE FROM t2;
144144
RESET MASTER;
145145

@@ -165,7 +165,7 @@ SELECT count(*) FROM t2;
165165

166166
### ACTION: clean up and move to the next test
167167
SET AUTOCOMMIT= 1;
168-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
168+
SET GLOBAL debug_dbug=@old_debug;
169169
DELETE FROM t2;
170170
RESET MASTER;
171171

@@ -185,7 +185,7 @@ SELECT count(*) FROM t4;
185185
SELECT count(*) FROM t4;
186186

187187
-- echo ### check that the incident event is written to the current log
188-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
188+
SET GLOBAL debug_dbug=@old_debug;
189189
-- let $binlog_limit= 4,1
190190
-- source include/show_binlog_events.inc
191191

@@ -229,7 +229,7 @@ SELECT count(*) FROM t4;
229229
SELECT count(*) FROM t2;
230230

231231
# remove fault injection
232-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
232+
SET GLOBAL debug_dbug=@old_debug;
233233

234234
-- echo ###################### TEST #9
235235

@@ -248,7 +248,7 @@ DELETE FROM t4;
248248
SELECT count(*) FROM t2;
249249
SELECT count(*) FROM t4;
250250
SET SQL_LOG_BIN=1;
251-
SET GLOBAL debug_dbug="-d,error_unique_log_filename";
251+
SET GLOBAL debug_dbug=@old_debug;
252252

253253
-- echo ###################### TEST #10
254254

@@ -340,7 +340,6 @@ DROP TABLE t5;
340340
--source include/rpl_restart_server.inc
341341

342342
## clean up
343-
SET GLOBAL debug_dbug= @old_debug;
344343
DROP TABLE t1, t2, t4;
345344
RESET MASTER;
346345

@@ -398,7 +397,6 @@ call mtr.add_suppression("Can't generate a unique log-filename .*");
398397

399398
### clean up
400399
-- source include/stop_slave_sql.inc
401-
SET GLOBAL debug_dbug=@old_debug;
402400
RESET SLAVE;
403401
RESET MASTER;
404402
--let $rpl_only_running_threads= 1

0 commit comments

Comments
 (0)