From f7ba9dafd5f92863ffd9a0b3ebee7147d73bbb21 Mon Sep 17 00:00:00 2001 From: Konstantin Osipov Date: Tue, 1 Dec 2009 18:20:43 +0300 Subject: Backport of: ------------------------------------------------------------ revno: 2630.9.2 committer: Dmitry Lenev branch nick: mysql-6.0-3726-w3 timestamp: Tue 2008-06-10 18:01:56 +0400 message: WL#3726 "DDL locking for all metadata objects". After review fixes in progress. sql/mdl.cc: Changed mdl_acquire_shared_lock() signature to accept MDL_CONTEXT as one of arguments as described in specification. sql/mdl.h: Changed mdl_acquire_shared_lock() signature to accept MDL_CONTEXT as one of arguments as described in specification. sql/sql_base.cc: Changed mdl_acquire_shared_lock() signature to accept MDL_CONTEXT as one of arguments as described in specification. Renamed handle_failed_open_table_attempt() to recover_from_failed_open_table_attempt() as suggested by review. Added comment clarifying why we need to check TABLE::db_stat while looking at TABLE instances open by other threads. sql/sql_show.cc: Changed mdl_acquire_shared_lock() signature to accept MDL_CONTEXT as one of arguments as described in specification. --- sql/mdl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/mdl.h') diff --git a/sql/mdl.h b/sql/mdl.h index f99f38d6285..b192980ebaa 100644 --- a/sql/mdl.h +++ b/sql/mdl.h @@ -164,7 +164,8 @@ inline void mdl_set_lock_type(MDL_LOCK_DATA *lock_data, enum_mdl_type lock_type) lock_data->type= lock_type; } -bool mdl_acquire_shared_lock(MDL_LOCK_DATA *lock_data, bool *retry); +bool mdl_acquire_shared_lock(MDL_CONTEXT *context, MDL_LOCK_DATA *lock_data, + bool *retry); bool mdl_acquire_exclusive_locks(MDL_CONTEXT *context); bool mdl_upgrade_shared_lock_to_exclusive(MDL_CONTEXT *context, MDL_LOCK_DATA *lock_data); -- cgit v1.2.1