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

30 lines
1.1 KiB
Text

--source include/have_binlog_format_row.inc
--source include/have_innodb_binlog.inc
--echo *** Test that binlogging throttles large writes, waiting for InnoDB checkpoints as needed
CREATE TABLE t1 (a INT, b INT, c LONGTEXT, PRIMARY KEY(a, b)) ENGINE=InnoDB;
# Do a large amount of binlogging in a single operation. The binlog write
# must throttle the amount of data and wait for InnoDB checkpoints as
# approrpiate to avoid overwriting the head of the cyclic InnoDB write-ahead
# log. Otherwise it will cause an error in the error log that will make the
# test fail:
#
# [ERROR] InnoDB: Crash recovery is broken due to insufficient innodb_log_file_size
SET @old_max_packet= @@GLOBAL.max_allowed_packet;
SET GLOBAL max_allowed_packet=128*1024*1024;
SET @old_max_binlog= @@GLOBAL.max_binlog_size;
SET GLOBAL max_binlog_size= 16*1024*1024;
--connect (con1,localhost,root)
INSERT INTO t1 VALUES (1, 1, REPEAT('x', 64*1024*1024));
--disconnect con1
--connection default
SELECT a, b, LENGTH(c) FROM t1 ORDER BY a, b;
SET GLOBAL max_allowed_packet= @old_max_packet;
SET GLOBAL max_binlog_size= @old_max_binlog;
DROP TABLE t1;