Commit 185db2df authored by Kristian Nielsen's avatar Kristian Nielsen

MDEV-34705: Binlog in Engine: Resume from existing binlogs

When (re-)starting the server, check for any existing binlog files.
Open the last two found (if any), and find the position that was last
written before the restart. Continue binlogging from that point rather
than creating new binlog files.
Signed-off-by: default avatarKristian Nielsen <knielsen@knielsen-hq.org>
parent 505c1c55
--source include/have_innodb.inc
--binlog-storage-engine=innodb --max-binlog-size=256K
......@@ -864,6 +864,7 @@ our @tags=
"binlog_formats", ["row", "statement"]],
["include/have_innodb.inc", "innodb_test", 1],
["include/have_innodb_binlog.inc", "innodb_test", 1],
["include/have_log_bin.inc", "need_binlog", 1],
["include/big_test.inc", "big_test", 1],
["include/have_debug.inc", "need_debug", 1],
......
--source include/have_innodb.inc
--source include/have_innodb_binlog.inc
--source include/have_binlog_format_mixed.inc
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
--source include/have_innodb_binlog.inc
--source include/have_binlog_format_mixed.inc
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, 0);
--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog1.txt
--source include/restart_mysqld.inc
INSERT INTO t1 VALUES (2, 0);
--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog2.txt
--source include/restart_mysqld.inc
INSERT INTO t1 VALUES (3, 0);
--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog3.txt
DROP TABLE t1;
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment