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

MDEV-34705: Binlog-in-engine: Implement RESET MASTER

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2025-01-14 12:41:34 +01:00
parent 6889c8e4cf
commit c67b014c9c
14 changed files with 163 additions and 32 deletions

View File

@@ -1,6 +1,8 @@
--source include/have_binlog_format_row.inc
--source include/have_innodb_binlog.inc
RESET MASTER;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (a INT PRIMARY KEY, b VARCHAR(2048)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
@@ -18,4 +20,16 @@ SHOW BINARY LOGS;
FLUSH BINARY LOGS;
SHOW BINARY LOGS;
RESET MASTER;
# ToDo: This will be racy, the second binlog file binlog-000001.ibb is
# pre-allocated in the background, so will be visible or not depending on exact
# timing. So just omit this SHOW BINARY LOGS or wait for both to be created
# or something.
SHOW BINARY LOGS;
INSERT INTO t1 VALUES (100);
INSERT INTO t2 VALUES (100, 'xyzzy');
DROP TABLE t1, t2;
--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --start-position=0-1-1 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog.txt

View File

@@ -6,6 +6,8 @@
# files and only need to include the one.
--source include/have_innodb_binlog.inc
RESET MASTER;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
--let $gtid_pos= `SELECT @@last_gtid`
INSERT INTO t1 VALUES (1);

View File

@@ -1,6 +1,9 @@
--source include/have_binlog_format_mixed.inc
--source include/have_innodb_binlog.inc
# RESET MASTER deliberately omitted here for now; the test should be able to
# work on top of any existing binlog.
CREATE TABLE sbtest1(
id INTEGER NOT NULL AUTO_INCREMENT,
k INTEGER DEFAULT '0' NOT NULL,

View File

@@ -6,6 +6,8 @@
# Note: This test also tests the --binlog-directory option by putting it
# in binlog_in_engine_restart.opt .
RESET MASTER;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, 0);
let $i= 0;