| 1 |
--source include/have_binlog_format_row.inc |
| 2 |
--source include/master-slave.inc |
| 3 |
|
| 4 |
|
| 5 |
--echo # |
| 6 |
--echo # MDEV-31404 Implement binlog_space_limit |
| 7 |
--echo # |
| 8 |
|
| 9 |
--echo # Test that master is not deleting binary logs before slave has a |
| 10 |
--echo # chance to digest them |
| 11 |
|
| 12 |
select @@global.max_binlog_total_size; |
| 13 |
select @@global.max_binlog_size; |
| 14 |
|
| 15 |
--connection slave |
| 16 |
STOP SLAVE IO_THREAD; |
| 17 |
--source include/wait_for_slave_io_to_stop.inc |
| 18 |
--connection master |
| 19 |
|
| 20 |
# Kill the dump thread |
| 21 |
let $id=`SELECT id from information_schema.processlist where command='Binlog Dump'`; |
| 22 |
|
| 23 |
if ($id) |
| 24 |
{ |
| 25 |
replace_result $id DUMP_THREAD; |
| 26 |
eval kill $id; |
| 27 |
let $wait_condition= SELECT count(*)=0 from information_schema.processlist where command='Killed'; |
| 28 |
source include/wait_condition.inc; |
| 29 |
} |
| 30 |
|
| 31 |
CREATE TABLE `t1` ( |
| 32 |
`v1` int(11) DEFAULT NULL, |
| 33 |
`v2` varchar(8000) DEFAULT NULL, |
| 34 |
KEY `v1` (`v1`) |
| 35 |
); |
| 36 |
|
| 37 |
FLUSH LOGS; |
| 38 |
FLUSH LOGS; |
| 39 |
FLUSH LOGS; |
| 40 |
--source include/show_binary_logs.inc |
| 41 |
|
| 42 |
INSERT INTO t1 VALUES (0,repeat("a",3000)); |
| 43 |
--source include/show_binary_logs.inc |
| 44 |
|
| 45 |
--connection slave |
| 46 |
START SLAVE IO_THREAD; |
| 47 |
--connection master |
| 48 |
|
| 49 |
--sync_slave_with_master |
| 50 |
--connection master |
| 51 |
|
| 52 |
# Slave is now connected. Next query should remove old binary logs. |
| 53 |
|
| 54 |
DROP TABLE t1; |
| 55 |
--source include/show_binary_logs.inc |
| 56 |
|
| 57 |
# End of 11.4 tests |
| 58 |
--source include/rpl_end.inc |