MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Deadlock_detection_visitor Class Reference
Inheritance diagram for Deadlock_detection_visitor:
Collaboration diagram for Deadlock_detection_visitor:

Public Member Functions

 Deadlock_detection_visitor (MDL_context *start_node_arg)
virtual bool enter_node (MDL_context *node)
virtual void leave_node (MDL_context *node)
virtual bool inspect_edge (MDL_context *dest)
MDL_contextget_victim () const

Additional Inherited Members

- Public Attributes inherited from MDL_wait_for_graph_visitor
uint m_lock_open_count

Detailed Description

A context of the recursive traversal through all contexts in all sessions in search for deadlock.

Definition at line 194 of file mdl.cc.

Member Function Documentation

bool Deadlock_detection_visitor::enter_node ( MDL_context node)
virtual

Enter a node of a wait-for graph. After a node is entered, inspect_edge() will be called for all wait-for destinations of this node. Then leave_node() will be called. We call "enter_node()" for all nodes we inspect, including the starting node.

Return values
TRUEMaximum search depth exceeded.
FALSEOK.

Implements MDL_wait_for_graph_visitor.

Definition at line 261 of file mdl.cc.

bool Deadlock_detection_visitor::inspect_edge ( MDL_context node)
virtual

Inspect a wait-for graph edge from one MDL context to another.

Return values
TRUEA loop is found.
FALSENo loop is found.

Implements MDL_wait_for_graph_visitor.

Definition at line 296 of file mdl.cc.

void Deadlock_detection_visitor::leave_node ( MDL_context node)
virtual

Done inspecting this node. Decrease the search depth. If a deadlock is found, and we are backtracking to the start node, optionally change the deadlock victim to one with lower deadlock weight.

Implements MDL_wait_for_graph_visitor.

Definition at line 281 of file mdl.cc.


The documentation for this class was generated from the following file: