summaryrefslogtreecommitdiff
path: root/sql/sys_vars.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2014-03-12 00:14:49 +0100
committerunknown <knielsen@knielsen-hq.org>2014-03-12 00:14:49 +0100
commit8b9b7ec395df111f886224a565b63a1a312e5679 (patch)
treea44e2719f727964a854ed9c45e26e7314f6b62a4 /sql/sys_vars.cc
parent2c2478b82260f5110ea2c5bed3c6c7bcd3558453 (diff)
downloadmariadb-git-8b9b7ec395df111f886224a565b63a1a312e5679.tar.gz
MDEV-5804: If same GTID is received on multiple master connections in multi-source replication, the event is double-executed causing corruption or replication failure
Some fixes, mainly to make it work in non-parallel replication mode also (--slave-parallel-threads=0). Patch should be fairly complete now.
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r--sql/sys_vars.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 8aa202b381b..c9f1055d17a 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -1839,18 +1839,14 @@ static bool
fix_gtid_ignore_duplicates(sys_var *self, THD *thd, enum_var_type type)
{
bool running;
- bool err= false;
mysql_mutex_unlock(&LOCK_global_system_variables);
mysql_mutex_lock(&LOCK_active_mi);
running= master_info_index->give_error_if_slave_running();
mysql_mutex_unlock(&LOCK_active_mi);
- if (running)
- err= true;
mysql_mutex_lock(&LOCK_global_system_variables);
- /* ToDo: Isn't there a race here? I need to change the variable only under the LOCK_active_mi, and only if running is false. */
- return err;
+ return running ? true : false;
}