diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-02-23 20:53:29 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-02-23 20:53:29 -0500 |
commit | 0d58323e2645460907280b0482811729822a7ef1 (patch) | |
tree | 1b0400c627851e0cb9c9445e24367a5ce9fd5d4d /sql/sys_vars.cc | |
parent | 276d65b324f4f0021bc457b4d5723153d4e12608 (diff) | |
parent | a4b271496888e1f8628d0af36309e35293093577 (diff) | |
download | mariadb-git-0d58323e2645460907280b0482811729822a7ef1.tar.gz |
Merge tag 'mariadb-10.0.24' into 10.0-galera
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r-- | sql/sys_vars.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index e971f367fa3..c49a5de75e3 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -4356,6 +4356,29 @@ static bool update_slave_skip_counter(sys_var *self, THD *thd, Master_info *mi) mi->connection_name.str); return true; } + if (mi->using_gtid != Master_info::USE_GTID_NO && + opt_slave_parallel_threads > 0) + { + ulong domain_count; + mysql_mutex_lock(&rpl_global_gtid_slave_state->LOCK_slave_state); + domain_count= rpl_global_gtid_slave_state->count(); + mysql_mutex_unlock(&rpl_global_gtid_slave_state->LOCK_slave_state); + if (domain_count > 1) + { + /* + With domain-based parallel replication, the slave position is + multi-dimensional, so the relay log position is not very meaningful. + It might not even correspond to the next GTID to execute in _any_ + domain (the case after error stop). So slave_skip_counter will most + likely not do what the user intends. Instead give an error, with a + suggestion to instead set @@gtid_slave_pos past the point of error; + this works reliably also in the case of multiple domains. + */ + my_error(ER_SLAVE_SKIP_NOT_IN_GTID, MYF(0)); + return true; + } + } + /* The value was stored temporarily in thd */ mi->rli.slave_skip_counter= thd->variables.slave_skip_counter; return false; |