Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f3e12c75
Commit
f3e12c75
authored
Jun 02, 2010
by
Konstantin Osipov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments to a few MDL deadlock-search related variables
and methods.
parent
559e3889
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
sql/mdl.cc
sql/mdl.cc
+11
-1
sql/mdl.h
sql/mdl.h
+1
-0
No files found.
sql/mdl.cc
View file @
f3e12c75
...
@@ -119,8 +119,18 @@ public:
...
@@ -119,8 +119,18 @@ public:
victim
(
NULL
),
victim
(
NULL
),
current_search_depth
(
0
)
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
;
MDL_context
*
start
;
/** If a deadlock is found, the context that identifies the victim. */
MDL_context
*
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
;
uint
current_search_depth
;
/**
/**
Maximum depth for deadlock searches. After this depth is
Maximum depth for deadlock searches. After this depth is
...
@@ -408,7 +418,7 @@ mdl_locks_key(const uchar *record, size_t *length,
...
@@ -408,7 +418,7 @@ mdl_locks_key(const uchar *record, size_t *length,
statement, the design capitalizes on that to later save on
statement, the design capitalizes on that to later save on
look ups in the table definition cache. This leads to reduced
look ups in the table definition cache. This leads to reduced
contention overall and on LOCK_open in particular.
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.
for details.
*/
*/
...
...
sql/mdl.h
View file @
f3e12c75
...
@@ -322,6 +322,7 @@ public:
...
@@ -322,6 +322,7 @@ public:
DBUG_ASSERT
(
ticket
==
NULL
);
DBUG_ASSERT
(
ticket
==
NULL
);
type
=
type_arg
;
type
=
type_arg
;
}
}
/* A helper used to determine which lock request should be aborted. */
uint
get_deadlock_weight
()
const
;
uint
get_deadlock_weight
()
const
;
static
MDL_request
*
create
(
MDL_key
::
enum_mdl_namespace
mdl_namespace
,
static
MDL_request
*
create
(
MDL_key
::
enum_mdl_namespace
mdl_namespace
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment