summaryrefslogtreecommitdiff
path: root/sql/mdl.cc
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2010-06-02 12:06:07 +0400
committerKonstantin Osipov <kostja@sun.com>2010-06-02 12:06:07 +0400
commit8867c0a52c69745f90bc24e11f5945d6eca6d88e (patch)
tree332f40106fc9eaf9b67e822cf15c2c7b3dc2dcec /sql/mdl.cc
parent5fa66315e992e9c2743f43e8c583a9e97c0ae085 (diff)
downloadmariadb-git-8867c0a52c69745f90bc24e11f5945d6eca6d88e.tar.gz
Add comments to a few MDL deadlock-search related variables
and methods. sql/mdl.cc: Add comments. sql/mdl.h: Add a comment.
Diffstat (limited to 'sql/mdl.cc')
-rw-r--r--sql/mdl.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc
index ba938f8714b..b3702997168 100644
--- a/sql/mdl.cc
+++ b/sql/mdl.cc
@@ -119,8 +119,18 @@ public:
victim(NULL),
current_search_depth(0)
{ }
+ /**
+ The context which has initiated the search. There
+ can be multiple searches happening in parallel at the same time.
+ */
MDL_context *start;
+ /** If a deadlock is found, the context that identifies the victim. */
MDL_context *victim;
+ /** Set to the MAX_SEARCH_DEPTH at start. Decreased whenever
+ we descend into another MDL context (aka traverse to the next
+ wait-for graph node). When 0 is reached, we assume that
+ a deadlock is found, even if we have not found a loop.
+ */
uint current_search_depth;
/**
Maximum depth for deadlock searches. After this depth is
@@ -408,7 +418,7 @@ mdl_locks_key(const uchar *record, size_t *length,
statement, the design capitalizes on that to later save on
look ups in the table definition cache. This leads to reduced
contention overall and on LOCK_open in particular.
- Please see the description of MDL_context::acquire_shared_lock()
+ Please see the description of MDL_context::acquire_lock_impl()
for details.
*/