mariadb/mysql-test/suite/binlog_in_engine/crash_safe_slave2.result
Kristian Nielsen 7081f2a58e Binlog-in-engine: New binlog implementation integrated in InnoDB
Implement an improved binlog implementation that is integrated into
the storage engine. The new implementation is enabled with the
--binlog-storage-engine option. Initially the InnoDB storage engine
implements the binlog.

Integrating the binlog in the storage engine improves performance,
since it makes the InnoDB redo log the single source of truth and
avoids the need for expensive two-phase commit between binlog and
engine. It also makes it possible to disable durability (set
--innodb-flush-log-at-trx-commit=0) to further improve performance,
while still preserving the ability to recover the binlog and database
into a consistent state after a crash.

The new binlog implementation also greatly improves the internal
design and implementation of the binlog, and enables future
enhancements for replication.

This is a squash of the original 11.4-based patch series.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-01-23 03:21:03 +01:00

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