From cae6e72a40800664af6106560e706d38c79c3bbc Mon Sep 17 00:00:00 2001 From: Konstantin Osipov Date: Fri, 4 Dec 2009 01:48:14 +0300 Subject: [PATCH] Backport of: ---------------------------------------------------------- revno: 2617.22.7 committer: Konstantin Osipov branch nick: mysql-6.0-runtime timestamp: Tue 2009-01-27 16:41:58 +0300 message: WL#4284 "Transactional DDL locking" review. Improve a comment. sql/mdl.cc: Improve a comment. --- sql/mdl.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sql/mdl.cc b/sql/mdl.cc index f28778a1a83..78a85f49952 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -1320,10 +1320,11 @@ void mdl_release_locks(MDL_CONTEXT *context) { DBUG_PRINT("info", ("found lock to release lock_data=%p", lock_data)); /* - We should not release locks which pending shared locks as these - are not associated with lock object and don't present in its - lists. Allows us to avoid problems in open_tables() in case of - back-off + Don't call release_lock() for a shared lock if has not been + granted. Lock state in this case is MDL_INITIALIZED. + We have pending and granted shared locks in the same context + when this function is called from the "back-off" path of + open_tables(). */ if (lock_data->state != MDL_INITIALIZED) {