From 3771e14ea9957dde8f25ccf9f99df7a2aa906fcb Mon Sep 17 00:00:00 2001 From: Kentoku SHIBA Date: Wed, 11 Dec 2013 00:31:04 +0900 Subject: add metadata_lock_info --- sql/mdl.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sql/mdl.h') diff --git a/sql/mdl.h b/sql/mdl.h index e79df9b6cd7..4b24c0b7f59 100644 --- a/sql/mdl.h +++ b/sql/mdl.h @@ -904,14 +904,14 @@ private: MDL_wait_for_subgraph *m_waiting_for; private: THD *get_thd() const { return m_owner->get_thd(); } - MDL_ticket *find_ticket(MDL_request *mdl_req, - enum_mdl_duration *duration); void release_locks_stored_before(enum_mdl_duration duration, MDL_ticket *sentinel); void release_lock(enum_mdl_duration duration, MDL_ticket *ticket); bool try_acquire_lock_impl(MDL_request *mdl_request, MDL_ticket **out_ticket); public: + MDL_ticket *find_ticket(MDL_request *mdl_req, + enum_mdl_duration *duration); void find_deadlock(); ulong get_thread_id() const { return thd_get_thread_id(get_thd()); } @@ -988,4 +988,7 @@ static const ulong MDL_LOCKS_HASH_PARTITIONS_DEFAULT = 8; to avoid starving out weak, low-prio locks. */ extern "C" ulong max_write_lock_count; + +extern MYSQL_PLUGIN_IMPORT +int mdl_iterate(int (*callback)(MDL_ticket *ticket, void *arg), void *arg); #endif -- cgit v1.2.1 From cd342e78b8cd124f2a99602547a037f7fbf51076 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Mon, 16 Dec 2013 12:26:20 +0400 Subject: MDEV-4748 - metadata_lock_info plugin - restore find_ticket() private status, declare friend function instead - added metadata_lock_info to DEFAULT_SUITES --- sql/mdl.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sql/mdl.h') diff --git a/sql/mdl.h b/sql/mdl.h index 4b24c0b7f59..c7c445c75e1 100644 --- a/sql/mdl.h +++ b/sql/mdl.h @@ -904,14 +904,14 @@ private: MDL_wait_for_subgraph *m_waiting_for; private: THD *get_thd() const { return m_owner->get_thd(); } + MDL_ticket *find_ticket(MDL_request *mdl_req, + enum_mdl_duration *duration); void release_locks_stored_before(enum_mdl_duration duration, MDL_ticket *sentinel); void release_lock(enum_mdl_duration duration, MDL_ticket *ticket); bool try_acquire_lock_impl(MDL_request *mdl_request, MDL_ticket **out_ticket); public: - MDL_ticket *find_ticket(MDL_request *mdl_req, - enum_mdl_duration *duration); void find_deadlock(); ulong get_thread_id() const { return thd_get_thread_id(get_thd()); } @@ -944,6 +944,9 @@ public: private: MDL_context(const MDL_context &rhs); /* not implemented */ MDL_context &operator=(MDL_context &rhs); /* not implemented */ + + /* metadata_lock_info plugin */ + friend int i_s_metadata_lock_info_fill_row(MDL_ticket*, void*); }; -- cgit v1.2.1