mariadb/mysql-test/suite/rpl/r/rpl_binlog_directory.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

52 lines
1.3 KiB
Text

include/master-slave.inc
[connection master]
*** Test the --binlog-directory variable with legacy binlog.
connection slave;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=Slave_pos;
connection master;
SELECT @@GLOBAL.binlog_storage_engine;
@@GLOBAL.binlog_storage_engine
NULL
CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
INSERT INTO t1 VALUES (1, 10);
include/rpl_stop_server.inc [server_number=1]
include/rpl_start_server.inc [server_number=1 parameters: --binlog-directory=binlog_dir]
INSERT INTO t1 VALUES (2, 11);
include/rpl_stop_server.inc [server_number=1]
include/rpl_start_server.inc [server_number=1]
INSERT INTO t1 VALUES (3, 12);
include/save_master_gtid.inc
show binary logs;
Log_name File_size
master-bin.000001 #
master-bin.000002 #
master-bin.000002 #
*** Contents of master-bin.index (including directory path):
./master-bin.000001
binlog_dir/master-bin.000002
./master-bin.000002
SELECT * FROM t1 ORDER BY a;
a b
1 10
2 11
3 12
connection slave;
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
a b
1 10
2 11
3 12
connection slave;
include/stop_slave.inc
SET GLOBAL gtid_slave_pos= '';
connection master;
include/kill_binlog_dump_threads.inc
RESET MASTER;
connection slave;
include/start_slave.inc
connection master;
DROP TABLE t1;
include/rpl_end.inc