Debian Codegraph @

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

raw
1 include/master-slave.inc
2 [connection master]
3 #
4 # MDEV-34504 PURGE BINARY LOGS not working anymore
5 #
6 select @@slave_connections_needed_for_purge;
7 @@slave_connections_needed_for_purge
8 0
9 set @old_dbug= @@global.debug_dbug;
10 create table t1 (a int, b varchar(32768) charset latin1);
11 insert into t1 values(1,repeat("a",32768));
12 connection slave;
13 select a from t1;
14 a
15 1
16 set @@global.debug_dbug= "+d,pause_before_io_read_event";
17 connection master;
18 insert into t1 values(2,repeat("b",32768));
19 insert into t1 values(3,repeat("c",32768));
20 connection slave;
21 set debug_sync='now wait_for io_thread_at_read_event';
22 select a from t1;
23 a
24 1
25 connection master;
26 FLUSH BINARY LOGS;
27 show binary logs;
28 Log_name File_size
29 master-bin.000001 #
30 master-bin.000002 #
31 PURGE BINARY LOGS TO 'master-bin.000002';
32 Warnings:
33 Note 1375 Binary log XXX is not purged because it is in use by a slave thread
34 show binary logs;
35 Log_name File_size
36 master-bin.000001 #
37 master-bin.000002 #
38 connection slave;
39 set @@global.debug_dbug= @old_dbug;
40 set debug_sync='now signal io_thread_continue_read_event';
41 connection master;
42 connection slave;
43 select count(*) from t1;
44 count(*)
45 153
46 connection master;
47 PURGE BINARY LOGS TO 'master-bin.000002';
48 show binary logs;
49 Log_name File_size
50 master-bin.000002 #
51 drop table t1;
52 include/rpl_end.inc