diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-01-22 18:00:37 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-01-22 18:00:37 -0500 |
commit | 0105bf349a44f33fff3410af1db31d4c6116f14a (patch) | |
tree | ffc8016e544755bb1375151e4240d19abc77fb21 /sql/wsrep_var.cc | |
parent | ab440b0fb7302d707ba0ba41382bf911404db1cb (diff) | |
download | mariadb-git-0105bf349a44f33fff3410af1db31d4c6116f14a.tar.gz |
MDEV-7476: Allow SELECT to succeed even when node is not ready
Added a SESSION-only system variable "wsrep_dirty_reads" to allow SELECT
queries to pass even when the node is not prepared to accept queries
(wsrep_ready=OFF). Added a test case.
Diffstat (limited to 'sql/wsrep_var.cc')
-rw-r--r-- | sql/wsrep_var.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index c6e9b89ca55..8a4fa4cd14f 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -353,7 +353,14 @@ bool wsrep_cluster_address_update (sys_var *self, THD* thd, enum_var_type type) */ mysql_mutex_unlock(&LOCK_global_system_variables); wsrep_stop_replication(thd); + + /* + Unlock and lock LOCK_wsrep_slave_threads to maintain lock order & avoid + any potential deadlock. + */ + mysql_mutex_unlock(&LOCK_wsrep_slave_threads); mysql_mutex_lock(&LOCK_global_system_variables); + mysql_mutex_lock(&LOCK_wsrep_slave_threads); if (wsrep_start_replication()) { |