mirror of
https://github.com/MariaDB/server.git
synced 2026-02-05 02:09:07 +01:00
In the new binlog implementation, GTID is the only method available to identify binlog positions, and the old-style filename/offset is not 100% meaningful, as a transaction or even single event can span multiple binlog files. However, having at least a filename available on the slave is still useful eg. for debugging purposes if the slave halts with an error; for example to know which file to run mariadb-binlog on. This patch makes the binlog dump thread send fake rotate events containing approximate file name for GTID events. This provides the file name to the slave. The offset is always sent as 0. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
71 lines
2 KiB
Text
71 lines
2 KiB
Text
include/master-slave.inc
|
|
[connection master]
|
|
connection slave;
|
|
include/stop_slave.inc
|
|
connection master;
|
|
include/reset_master.inc
|
|
connection slave;
|
|
include/start_slave.inc
|
|
connection master;
|
|
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4096)) ENGINE=InnoDB;
|
|
connection master;
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
include/sync_with_master_gtid.inc
|
|
connection master;
|
|
Slave current file: binlog-000000.ibb / binlog-000000.ibb
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
include/sync_with_master_gtid.inc
|
|
connection master;
|
|
Slave current file: binlog-000001.ibb / binlog-000001.ibb
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
include/sync_with_master_gtid.inc
|
|
connection master;
|
|
Slave current file: binlog-000001.ibb / binlog-000001.ibb
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
include/sync_with_master_gtid.inc
|
|
connection master;
|
|
Slave current file: binlog-000002.ibb / binlog-000002.ibb
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
include/sync_with_master_gtid.inc
|
|
connection master;
|
|
Slave current file: binlog-000002.ibb / binlog-000002.ibb
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
include/sync_with_master_gtid.inc
|
|
connection master;
|
|
Slave current file: binlog-000003.ibb / binlog-000003.ibb
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
include/sync_with_master_gtid.inc
|
|
connection master;
|
|
Slave current file: binlog-000003.ibb / binlog-000003.ibb
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
include/sync_with_master_gtid.inc
|
|
connection master;
|
|
Slave current file: binlog-000004.ibb / binlog-000004.ibb
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
include/sync_with_master_gtid.inc
|
|
connection master;
|
|
Slave current file: binlog-000004.ibb / binlog-000004.ibb
|
|
include/save_master_gtid.inc
|
|
connection slave;
|
|
include/sync_with_master_gtid.inc
|
|
connection master;
|
|
Slave current file: binlog-000005.ibb / binlog-000005.ibb
|
|
SELECT COUNT(*) FROM t1;
|
|
COUNT(*)
|
|
300
|
|
connection slave;
|
|
SELECT COUNT(*) FROM t1;
|
|
COUNT(*)
|
|
300
|
|
connection master;
|
|
DROP TABLE t1;
|
|
include/rpl_end.inc
|