diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-03-25 14:42:15 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-03-25 14:42:15 -0400 |
commit | 3088d52c20eca10e5b8689648edef8f7fd49830a (patch) | |
tree | fc75c000b47e753c04cb2c74e48d8b74d22a509f /sql/wsrep_var.cc | |
parent | 3c0b3babd9fdaa6d6697289368022cc152c77593 (diff) | |
download | mariadb-git-3088d52c20eca10e5b8689648edef8f7fd49830a.tar.gz |
bzr merge -r3933..3945 codership/5.5 (Non-InnoDB changes only).
Diffstat (limited to 'sql/wsrep_var.cc')
-rw-r--r-- | sql/wsrep_var.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index 02e2584e86d..d187c7b9e35 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -331,7 +331,16 @@ bool wsrep_cluster_address_update (sys_var *self, THD* thd, enum_var_type type) bool wsrep_on_saved= thd->variables.wsrep_on; thd->variables.wsrep_on= false; + /* stop replication is heavy operation, and includes closing all client + connections. Closing clients may need to get LOCK_global_system_variables + at least in MariaDB. + + Note: releasing LOCK_global_system_variables may cause race condition, if + there can be several concurrent clients changing wsrep_provider + */ + mysql_mutex_unlock(&LOCK_global_system_variables); wsrep_stop_replication(thd); + mysql_mutex_lock(&LOCK_global_system_variables); if (wsrep_start_replication()) { |