1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-34705: Binlog-in-engine: Configurable binlog directory

Add option --binlog-directory, used to place the binlogs outside the data
directory (eg. to put them on different disk/file system).

Disallow specifying the binlog name in --log-bin when
--binlog-storage-engine is used, as the name is then not user configurable.

A ToDo (not implemented in this commit) is to use the --binlog-directory
value, if given, also for the legacy binlog implementation.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2025-01-06 20:26:24 +01:00
parent e6843ee29a
commit f0fdaa9665
15 changed files with 98 additions and 27 deletions

View File

@@ -1,5 +1,10 @@
--source include/have_innodb_binlog.inc
--source include/have_binlog_format_mixed.inc
# ToDo: For now, this has to come _after_ have_log_bin.inc (or
# have_binlog_format_*.inc), to override --log-bin=master-bin with empty
# --log-bin, as engine does not allow to set the binlog name.
# Alternatively, maybe could have separate have_innodb_binlog_format_*.inc
# files and only need to include the one.
--source include/have_innodb_binlog.inc
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
--let $gtid_pos= `SELECT @@last_gtid`

View File

@@ -1,5 +1,5 @@
--source include/have_innodb_binlog.inc
--source include/have_binlog_format_mixed.inc
--source include/have_innodb_binlog.inc
CREATE TABLE sbtest1(
id INTEGER NOT NULL AUTO_INCREMENT,

View File

@@ -1 +1,2 @@
--innodb-binlog-state-interval=65536
--binlog-directory=binlogs

View File

@@ -1,8 +1,11 @@
--source include/big_test.inc
--source include/have_innodb_binlog.inc
--source include/have_binlog_format_row.inc
--source include/have_innodb_binlog.inc
--source include/have_sequence.inc
# Note: This test also tests the --binlog-directory option by putting it
# in binlog_in_engine_restart.opt .
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, 0);
let $i= 0;

View File

@@ -1,2 +1,3 @@
--max-binlog-size=128k
--innodb-binlog-state-interval=64k
--log-bin

View File

@@ -0,0 +1 @@
--log-bin

View File

@@ -1,6 +1,6 @@
--source include/have_innodb_binlog.inc
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
--source include/have_innodb_binlog.inc
# Test a number of transactions that are large and get interleaved with each
# other over multiple binlog files.