diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-03-27 16:26:00 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-03-27 16:26:00 -0400 |
commit | 02ba2bfdb444531e6fe61716a4eaeab40e210bbd (patch) | |
tree | 0b67ad5b8f6e8a901ed2b6cac8d4692d8db8f112 /sql/mdl.cc | |
parent | 09e3094945694277a550cccc8bd1fd11338474b1 (diff) | |
parent | c5f7486654d7fd4941b202735799f9a7ec3c15eb (diff) | |
download | mariadb-git-02ba2bfdb444531e6fe61716a4eaeab40e210bbd.tar.gz |
Merging revision from codership-mysql/5.5 (r3928..3968) and
codership-mysql/5.6 (r4021..4065).
- Also contains fixes for some build failures.
Diffstat (limited to 'sql/mdl.cc')
-rw-r--r-- | sql/mdl.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc index 7ef105b9269..ff53793554a 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -22,6 +22,7 @@ #include <mysql/plugin.h> #include <mysql/service_thd_wait.h> #include <mysql/psi/mysql_stage.h> + #ifdef WITH_WSREP #include "wsrep_mysqld.h" #include "wsrep_thd.h" @@ -34,7 +35,6 @@ extern bool wsrep_grant_mdl_exception(MDL_context *requestor_ctx, MDL_ticket *ticket); #endif /* WITH_WSREP */ - #ifdef HAVE_PSI_INTERFACE static PSI_mutex_key key_MDL_map_mutex; static PSI_mutex_key key_MDL_wait_LOCK_wait_status; @@ -1480,7 +1480,7 @@ void MDL_lock::Ticket_list::add_ticket(MDL_ticket *ticket) DBUG_ASSERT(ticket->get_lock()); #ifdef WITH_WSREP if ((this == &(ticket->get_lock()->m_waiting)) && - wsrep_thd_is_brute_force((void *)(ticket->get_ctx()->wsrep_get_thd()))) + wsrep_thd_is_BF((void *)(ticket->get_ctx()->wsrep_get_thd()), false)) { Ticket_iterator itw(ticket->get_lock()->m_waiting); Ticket_iterator itg(ticket->get_lock()->m_granted); @@ -1491,7 +1491,7 @@ void MDL_lock::Ticket_list::add_ticket(MDL_ticket *ticket) while ((waiting= itw++) && !added) { - if (!wsrep_thd_is_brute_force((void *)(waiting->get_ctx()->wsrep_get_thd()))) + if (!wsrep_thd_is_BF((void *)(waiting->get_ctx()->wsrep_get_thd()), true)) { WSREP_DEBUG("MDL add_ticket inserted before: %lu %s", wsrep_thd_thread_id(waiting->get_ctx()->wsrep_get_thd()), @@ -1892,7 +1892,7 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg, ticket->is_incompatible_when_granted(type_arg)) #ifdef WITH_WSREP { - if (wsrep_thd_is_brute_force((void *)(requestor_ctx->wsrep_get_thd())) && + if (wsrep_thd_is_BF((void *)(requestor_ctx->wsrep_get_thd()),false) && key.mdl_namespace() == MDL_key::GLOBAL) { WSREP_DEBUG("global lock granted for BF: %lu %s", @@ -1933,7 +1933,7 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg, #ifdef WITH_WSREP else { - if (wsrep_thd_is_brute_force((void *)(requestor_ctx->wsrep_get_thd())) && + if (wsrep_thd_is_BF((void *)(requestor_ctx->wsrep_get_thd()), false) && key.mdl_namespace() == MDL_key::GLOBAL) { WSREP_DEBUG("global lock granted for BF (waiting queue): %lu %s", |