mariadb/mysql-test/suite/binlog_in_engine/binlog_file_pos.test
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

42 lines
1.1 KiB
Text

--source include/master-slave.inc
--source include/have_binlog_format_row.inc
--source include/have_innodb_binlog.inc
--connection slave
--source include/stop_slave.inc
--connection master
--source include/reset_master.inc
--connection slave
--source include/start_slave.inc
--connection master
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4096)) ENGINE=InnoDB;
# Cycle through a few binlog files and see the position updated on the slave.
--connection master
--let $i= 0
while ($i < 10) {
--let $j= 0
--disable_query_log
while ($j < 30) {
eval INSERT INTO t1 VALUES ($i*100+$j, repeat('.', 4000));
inc $j;
}
--enable_query_log
--source include/save_master_gtid.inc
--connection slave
--source include/sync_with_master_gtid.inc
--let $i_file= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1)
--let $s_file= query_get_value(SHOW SLAVE STATUS, Relay_Master_Log_File, 1)
--connection master
--echo Slave current file: $i_file / $s_file
inc $i;
}
SELECT COUNT(*) FROM t1;
--connection slave
SELECT COUNT(*) FROM t1;
--connection master
DROP TABLE t1;
--source include/rpl_end.inc