mirror of
https://github.com/MariaDB/server.git
synced 2026-03-19 14:58:42 +01:00
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>
31 lines
1.2 KiB
Text
31 lines
1.2 KiB
Text
--source include/not_embedded.inc
|
|
--source include/have_innodb_binlog.inc
|
|
|
|
--source include/reset_master.inc
|
|
|
|
--echo #
|
|
--echo # MDEV-38432: Issues with mariabackup's binlog-directory option
|
|
--echo #
|
|
|
|
create table t (a int) engine=InnoDB;
|
|
flush binary logs;
|
|
insert into t values (1);
|
|
flush binary logs;
|
|
|
|
--let $binlog_name= binlog-000002.ibb
|
|
--let $binlog_size= 262144
|
|
--source include/wait_for_engine_binlog.inc
|
|
|
|
--exec $XTRABACKUP --backup --target-dir=$MYSQL_TMP_DIR/mbackup --socket=$MASTER_MYSOCK --user=root --binlog-directory=backup_binlogs > $MYSQL_TMP_DIR/mbackup.log 2>&1
|
|
--exec $XTRABACKUP --prepare --target-dir=$MYSQL_TMP_DIR/mbackup > $MYSQL_TMP_DIR/mprepare.log 2>&1
|
|
--exec $XTRABACKUP --copy-back --target-dir=$MYSQL_TMP_DIR/mbackup --binlog-directory=binlogs --datadir=$MYSQL_TMP_DIR/mcopyback > $MYSQL_TMP_DIR/mcopyback.log 2>&1
|
|
# The bug was a missing slash, so the binlogs would be in mcopybackbinlogs/
|
|
--list_files $MYSQL_TMP_DIR/mcopyback/binlogs/ *
|
|
|
|
drop table t;
|
|
|
|
--remove_file $MYSQL_TMP_DIR/mbackup.log
|
|
--remove_file $MYSQL_TMP_DIR/mprepare.log
|
|
--remove_file $MYSQL_TMP_DIR/mcopyback.log
|
|
--rmdir $MYSQL_TMP_DIR/mbackup
|
|
--rmdir $MYSQL_TMP_DIR/mcopyback
|