File: purge_binlog.result

package info (click to toggle)
mariadb 1%3A11.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 765,428 kB
  • sloc: ansic: 2,382,827; cpp: 1,803,532; asm: 378,315; perl: 63,176; sh: 46,496; pascal: 40,776; java: 39,363; yacc: 20,428; python: 19,506; sql: 17,864; xml: 12,463; ruby: 8,544; makefile: 6,059; cs: 5,855; ada: 1,700; lex: 1,193; javascript: 1,039; objc: 80; tcl: 73; awk: 46; php: 22
file content (52 lines) | stat: -rw-r--r-- 1,285 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
include/master-slave.inc
[connection master]
#
# MDEV-34504 PURGE BINARY LOGS not working anymore
#
select @@slave_connections_needed_for_purge;
@@slave_connections_needed_for_purge
0
set @old_dbug= @@global.debug_dbug;
create table t1 (a int, b varchar(32768) charset latin1);
insert into t1 values(1,repeat("a",32768));
connection slave;
select a from t1;
a
1
set @@global.debug_dbug= "+d,pause_before_io_read_event";
connection master;
insert into t1 values(2,repeat("b",32768));
insert into t1 values(3,repeat("c",32768));
connection slave;
set debug_sync='now wait_for io_thread_at_read_event';
select a from t1;
a
1
connection master;
FLUSH BINARY LOGS;
show binary logs;
Log_name	File_size
master-bin.000001	#
master-bin.000002	#
PURGE BINARY LOGS TO 'master-bin.000002';
Warnings:
Note	1375	Binary log XXX is not purged because it is in use by a slave thread
show binary logs;
Log_name	File_size
master-bin.000001	#
master-bin.000002	#
connection slave;
set @@global.debug_dbug= @old_dbug;
set debug_sync='now signal io_thread_continue_read_event';
connection master;
connection slave;
select count(*) from t1;
count(*)
153
connection master;
PURGE BINARY LOGS TO 'master-bin.000002';
show binary logs;
Log_name	File_size
master-bin.000002	#
drop table t1;
include/rpl_end.inc