Debian Codegraph @

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

raw
1 --source include/have_debug.inc
2 --source include/have_debug_sync.inc
3 --source include/master-slave.inc
4 --source include/have_binlog_format_row.inc
5
6 --echo #
7 --echo # MDEV-34504 PURGE BINARY LOGS not working anymore
8 --echo #
9
10 select @@slave_connections_needed_for_purge;
11 set @old_dbug= @@global.debug_dbug;
12
13 create table t1 (a int, b varchar(32768) charset latin1);
14 insert into t1 values(1,repeat("a",32768));
15 --sync_slave_with_master
16 select a from t1;
17 set @@global.debug_dbug= "+d,pause_before_io_read_event";
18 --connection master
19 insert into t1 values(2,repeat("b",32768));
20 insert into t1 values(3,repeat("c",32768));
21 --connection slave
22 set debug_sync='now wait_for io_thread_at_read_event';
23 select a from t1;
24 --connection master
25 --disable_query_log
26 let $i=150;
27 while ($i)
28 {
29 --eval insert into t1 values($i+4,repeat(char(64+$i),32768));
30 --dec $i
31 }
32 --enable_query_log
33
34 FLUSH BINARY LOGS;
35 --source include/show_binary_logs.inc
36 --let $purge_to_binlog= query_get_value(SHOW MASTER STATUS, File, 1)
37 --replace_regex /Binary log.*is not/Binary log XXX is not/
38 --eval PURGE BINARY LOGS TO '$purge_to_binlog'
39 --source include/show_binary_logs.inc
40 --connection slave
41 set @@global.debug_dbug= @old_dbug;
42 set debug_sync='now signal io_thread_continue_read_event';
43 --connection master
44 --sync_slave_with_master
45 select count(*) from t1;
46 --connection master
47 --eval PURGE BINARY LOGS TO '$purge_to_binlog'
48 --source include/show_binary_logs.inc
49 drop table t1;
50
51 --source include/rpl_end.inc