1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-4937: sql_slave_skip_counter does not work with GTID

As a side-effect of purge_relay_logs(), sql_slave_skip_counter
was silently ignored in GTID mode.

But sql_slave_skip_counter in fact is not a good match with GTID.
And it is not really needed either, as users can explicitly set
@@gtid_slave_pos to skip specific GTIDs, in a way that matches
well how GTID replication works.

So with this patch, we give an error on attempts to set
sql_slave_skip_counter when using GTID, with a suggestion to use
gtid_slave_pos instead, if needed.
This commit is contained in:
unknown
2014-02-11 14:06:03 +01:00
parent f3a6f86ec3
commit cc7925765e
7 changed files with 45 additions and 1 deletions

View File

@ -68,8 +68,16 @@ save_master_pos;
connection server_4;
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
MASTER_USE_GTID=SLAVE_POS;
# Test that sql_slave_skip_counter is prevented in GTID mode.
--error ER_SLAVE_SKIP_NOT_IN_GTID
SET GLOBAL sql_slave_skip_counter=1;
--replace_result $MASTER_MYPORT MASTER_PORT
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
MASTER_USE_GTID=CURRENT_POS;
--error ER_SLAVE_SKIP_NOT_IN_GTID
SET GLOBAL sql_slave_skip_counter=10;
--source include/start_slave.inc
sync_with_master;
SELECT * FROM t1 ORDER BY a;