summaryrefslogtreecommitdiff
path: root/sql/mdl.cc
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2009-12-04 01:48:14 +0300
committerKonstantin Osipov <kostja@sun.com>2009-12-04 01:48:14 +0300
commitcae6e72a40800664af6106560e706d38c79c3bbc (patch)
treef679045c598cd92e16b4b66660f272a2edf15a17 /sql/mdl.cc
parent411a81954ecab031d58b99aaac3e2ee6518b6d80 (diff)
downloadmariadb-git-cae6e72a40800664af6106560e706d38c79c3bbc.tar.gz
Backport of:
---------------------------------------------------------- revno: 2617.22.7 committer: Konstantin Osipov <kostja@sun.com> 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.
Diffstat (limited to 'sql/mdl.cc')
-rw-r--r--sql/mdl.cc9
1 files 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)
{