summaryrefslogtreecommitdiff
path: root/sql/mdl.h
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.h
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.h')
-rw-r--r--sql/mdl.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/sql/mdl.h b/sql/mdl.h
index 6f31b46f17f..dbd44e8c6ab 100644
--- a/sql/mdl.h
+++ b/sql/mdl.h
@@ -519,17 +519,7 @@ public:
virtual bool inspect_edge(MDL_context *dest) = 0;
virtual ~MDL_wait_for_graph_visitor();
- MDL_wait_for_graph_visitor() :m_lock_open_count(0) {}
-public:
- /**
- XXX, hack: During deadlock search, we may need to
- inspect TABLE_SHAREs and acquire LOCK_open. Since
- LOCK_open is not a recursive mutex, count here how many
- times we "took" it (but only take and release once).
- Not using a native recursive mutex or rwlock in 5.5 for
- LOCK_open since it has significant performance impacts.
- */
- uint m_lock_open_count;
+ MDL_wait_for_graph_visitor() {}
};
/**
@@ -980,10 +970,6 @@ extern "C" unsigned long thd_get_thread_id(const MYSQL_THD thd);
*/
extern "C" int thd_is_connected(MYSQL_THD thd);
-#ifndef DBUG_OFF
-extern mysql_mutex_t LOCK_open;
-#endif
-
/*
Start-up parameter for the maximum size of the unused MDL_lock objects cache