From 3088d52c20eca10e5b8689648edef8f7fd49830a Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Tue, 25 Mar 2014 14:42:15 -0400 Subject: bzr merge -r3933..3945 codership/5.5 (Non-InnoDB changes only). --- sql/mdl.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sql/mdl.cc') diff --git a/sql/mdl.cc b/sql/mdl.cc index 2f00388a14b..399863d4d73 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -1482,7 +1482,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()->get_thd()), false)) { Ticket_iterator itw(ticket->get_lock()->m_waiting); Ticket_iterator itg(ticket->get_lock()->m_granted); @@ -1493,7 +1493,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()->get_thd()), true)) { WSREP_DEBUG("MDL add_ticket inserted before: %lu %s", wsrep_thd_thread_id(waiting->get_ctx()->wsrep_get_thd()), @@ -1894,7 +1894,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->get_thd()), false) && key.mdl_namespace() == MDL_key::GLOBAL) { WSREP_DEBUG("global lock granted for BF: %lu %s", @@ -1935,7 +1935,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->get_thd()), false) && key.mdl_namespace() == MDL_key::GLOBAL) { WSREP_DEBUG("global lock granted for BF (waiting queue): %lu %s", -- cgit v1.2.1 From b5871a51e99f2d591e944590f2e2332275064d07 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Wed, 26 Mar 2014 11:12:38 -0400 Subject: * bzr merge -r4027..4061 codership/5.6 * Merged Innodb changes to xtradb --- sql/mdl.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sql/mdl.cc') diff --git a/sql/mdl.cc b/sql/mdl.cc index 399863d4d73..4a3336d0031 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -22,6 +22,8 @@ #include #include #include +#include + #ifdef WITH_WSREP #include "wsrep_mysqld.h" #include "wsrep_thd.h" @@ -34,7 +36,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; @@ -1482,7 +1483,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_BF((void *)(ticket->get_ctx()->get_thd()), false)) + 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); @@ -1493,7 +1494,7 @@ void MDL_lock::Ticket_list::add_ticket(MDL_ticket *ticket) while ((waiting= itw++) && !added) { - if (!wsrep_thd_is_BF((void *)(waiting->get_ctx()->get_thd()), true)) + 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()), @@ -1894,7 +1895,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_BF((void *)(requestor_ctx->get_thd()), false) && + 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", @@ -1935,7 +1936,7 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg, #ifdef WITH_WSREP else { - if (wsrep_thd_is_BF((void *)(requestor_ctx->get_thd()), false) && + 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", -- cgit v1.2.1