summaryrefslogtreecommitdiff
path: root/sql/mdl.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2014-03-20 11:11:13 +0400
committerSergey Vojtovich <svoj@mariadb.org>2014-03-20 11:11:13 +0400
commite4fde57712afd106ccf9752ceadcdcac604da8d9 (patch)
tree38fa87f38f8af27d47f51bb9ebee3623b5b8bfcc /sql/mdl.cc
parent8250824a12fc173f14af8bb6a2cdbc29a94a84f0 (diff)
downloadmariadb-git-e4fde57712afd106ccf9752ceadcdcac604da8d9.tar.gz
MDEV-5864 - Reduce usage of LOCK_open: TABLE_SHARE::tdc.free_tables
Let TABLE_SHARE::tdc.free_tables, TABLE_SHARE::tdc.all_tables, TABLE_SHARE::tdc.flushed and corresponding invariants be protected by per-share TABLE_SHARE::tdc.LOCK_table_share instead of global LOCK_open.
Diffstat (limited to 'sql/mdl.cc')
-rw-r--r--sql/mdl.cc7
1 files changed, 0 insertions, 7 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc
index ce2483a8d8c..374a0407f78 100644
--- a/sql/mdl.cc
+++ b/sql/mdl.cc
@@ -1903,8 +1903,6 @@ bool MDL_lock::has_pending_conflicting_lock(enum_mdl_type type)
{
bool result;
- mysql_mutex_assert_not_owner(&LOCK_open);
-
mysql_prlock_rdlock(&m_rwlock);
result= (m_waiting.bitmap() & incompatible_granted_types_bitmap()[type]);
mysql_prlock_unlock(&m_rwlock);
@@ -2079,7 +2077,6 @@ MDL_context::try_acquire_lock_impl(MDL_request *mdl_request,
/* Don't take chances in production. */
mdl_request->ticket= NULL;
- mysql_mutex_assert_not_owner(&LOCK_open);
/*
Check whether the context already holds a shared lock on the object,
@@ -2169,7 +2166,6 @@ MDL_context::clone_ticket(MDL_request *mdl_request)
{
MDL_ticket *ticket;
- mysql_mutex_assert_not_owner(&LOCK_open);
/*
By submitting mdl_request->type to MDL_ticket::create()
we effectively downgrade the cloned lock to the level of
@@ -2830,7 +2826,6 @@ void MDL_context::release_lock(enum_mdl_duration duration, MDL_ticket *ticket)
lock->key.db_name(), lock->key.name()));
DBUG_ASSERT(this == ticket->get_ctx());
- mysql_mutex_assert_not_owner(&LOCK_open);
lock->remove_ticket(&MDL_lock::m_granted, ticket);
@@ -2923,8 +2918,6 @@ void MDL_context::release_all_locks_for_name(MDL_ticket *name)
void MDL_ticket::downgrade_lock(enum_mdl_type type)
{
- mysql_mutex_assert_not_owner(&LOCK_open);
-
/*
Do nothing if already downgraded. Used when we FLUSH TABLE under
LOCK TABLES and a table is listed twice in LOCK TABLES list.