mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-4475: Replication from MariaDB 10.0 to 5.5 does not work
The problem was the Gtid_list event which is logged to the binlog in 10.0 and is not understood by the 5.5 server. This event is supposed to be replaced with a dummy event for 5.5 servers. But the very first event logged in the very first binlog has an empty list of GTID, which makes the event too short to be replacable with an empty event. The fix is to pad the empty Gtid_list event to be big enough to be replacable by a dummy event.
This commit is contained in:
@@ -6,16 +6,23 @@ connection master;
|
||||
|
||||
set @old_master_binlog_checksum= @@global.binlog_checksum;
|
||||
set @old_slave_dbug= @@global.debug_dbug;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES (0);
|
||||
|
||||
sync_slave_with_master;
|
||||
# MDEV-4475: Cannot replicate to old server when binlog contains
|
||||
# empty Gtid_list event
|
||||
#
|
||||
# Test this by binlog rotation before we log any GTIDs.
|
||||
connection slave;
|
||||
|
||||
--echo # Test slave with no capability gets dummy event, which is ignored.
|
||||
--source include/stop_slave.inc
|
||||
--echo # Test slave with no capability gets dummy event, which is ignored.
|
||||
SET @@global.debug_dbug='+d,simulate_slave_capability_none';
|
||||
--source include/start_slave.inc
|
||||
|
||||
connection master;
|
||||
FLUSH LOGS;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES (0);
|
||||
sync_slave_with_master;
|
||||
|
||||
connection master;
|
||||
# Add a dummy event just to have something to sync_slave_with_master on.
|
||||
# Otherwise we occasionally get different $relaylog_start, depending on
|
||||
|
Reference in New Issue
Block a user