mirror of
https://github.com/MariaDB/server.git
synced 2026-02-14 22:58:42 +01:00
1. Fix the GTID lookup of a connecting slave/dump thread to not look at parts of the binlog that are not yet durable on disk on the master. This could cause the dump thread to be ahead of the valid durable end-point of the reader, causing assertion. 2. Fix bug in the flushing of binlog pages. The background flush thread would incorrectly flush at most one page per pthread_cond wakeup, which would cause it to get behind and binlog page flush to disk be delayed. 3. Fix incorrect check during InnoDB recovery scan of redo log; binlog redo records are allowed to be larger than InnoDB tablespace page size. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
87 lines
3.7 KiB
Text
87 lines
3.7 KiB
Text
include/master-slave.inc
|
|
[connection master]
|
|
*** Test that slave is not allowed to find a GTID starting position that is ahead of where the binlog is durable.
|
|
SELECT @@GLOBAL.max_binlog_size;
|
|
@@GLOBAL.max_binlog_size
|
|
524288
|
|
SELECT @@GLOBAL.innodb_binlog_state_interval;
|
|
@@GLOBAL.innodb_binlog_state_interval
|
|
65536
|
|
CREATE TABLE t1 (a LONGBLOB) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES ('initial');
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 0), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 1), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 2), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 3), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 4), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 5), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 6), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 7), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 8), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 9), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 10), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 11), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 12), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 13), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 14), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(97 + 15), 8192));
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
include/sync_with_master_gtid.inc
|
|
include/stop_slave.inc
|
|
connection master;
|
|
SET @old_dbug= @@GLOBAL.debug_dbug;
|
|
SET GLOBAL debug_dbug= '+d,block_binlog_durable';
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 0), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 1), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 2), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 3), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 4), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 5), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 6), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 7), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 8), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 9), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 10), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 11), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 12), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 13), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 14), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 15), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 16), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 17), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 18), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 19), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 20), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 21), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 22), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 23), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 24), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 25), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 26), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 27), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 28), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 29), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 30), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(65 + 31), 8192));
|
|
INSERT INTO t1 VALUES ('middle');
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
SET GLOBAL gtid_slave_pos= '0-1-50';
|
|
START SLAVE;
|
|
SELECT '0-1-50' as START_POS, @@GLOBAL.gtid_slave_pos as CURRENT_POS;
|
|
START_POS CURRENT_POS
|
|
0-1-50 0-1-50
|
|
connection master;
|
|
SET GLOBAL debug_dbug= @old_dbug;
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(48 + 0), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(48 + 1), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(48 + 2), 8192));
|
|
INSERT INTO t1 VALUES (REPEAT(CHR(48 + 3), 8192));
|
|
INSERT INTO t1 VALUES ('final');
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
include/sync_with_master_gtid.inc
|
|
connection master;
|
|
DROP TABLE t1;
|
|
include/rpl_end.inc
|