diff options
author | unknown <knielsen@knielsen-hq.org> | 2014-02-11 14:06:03 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2014-02-11 14:06:03 +0100 |
commit | cc7925765e23117bc7cb6dcfdcb0cd4ddcb9d2bc (patch) | |
tree | 5acb3287ef0a8c871b45ecf9f807ac3f24aeee4c /sql/sys_vars.cc | |
parent | f3a6f86ec3452b346de513075f72dbd02549a5fb (diff) | |
download | mariadb-git-cc7925765e23117bc7cb6dcfdcb0cd4ddcb9d2bc.tar.gz |
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.
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r-- | sql/sys_vars.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 0495ee3e240..69d93968f9f 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -3988,13 +3988,18 @@ bool update_multi_source_variable(sys_var *self_var, THD *thd, static bool update_slave_skip_counter(sys_var *self, THD *thd, Master_info *mi) { + if (mi->using_gtid != Master_info::USE_GTID_NO) + { + my_error(ER_SLAVE_SKIP_NOT_IN_GTID, MYF(0)); + return true; + } if (mi->rli.slave_running) { my_error(ER_SLAVE_MUST_STOP, MYF(0), mi->connection_name.length, mi->connection_name.str); return true; } - /* The value was stored temporarly in thd */ + /* The value was stored temporarily in thd */ mi->rli.slave_skip_counter= thd->variables.slave_skip_counter; return false; } |