My Project
|
#include <mdl.h>
Public Member Functions | |
bool | has_pending_conflicting_lock () const |
MDL_context * | get_ctx () const |
bool | is_upgradable_or_exclusive () const |
enum_mdl_type | get_type () const |
MDL_lock * | get_lock () const |
void | downgrade_lock (enum_mdl_type type) |
bool | has_stronger_or_equal_type (enum_mdl_type type) const |
bool | is_incompatible_when_granted (enum_mdl_type type) const |
bool | is_incompatible_when_waiting (enum_mdl_type type) const |
virtual bool | accept_visitor (MDL_wait_for_graph_visitor *dvisitor) |
virtual uint | get_deadlock_weight () const |
Public Attributes | |
MDL_ticket * | next_in_context |
MDL_ticket ** | prev_in_context |
MDL_ticket * | next_in_lock |
MDL_ticket ** | prev_in_lock |
Friends | |
class | MDL_context |
A granted metadata lock.
bool MDL_ticket::accept_visitor | ( | MDL_wait_for_graph_visitor * | gvisitor | ) | [virtual] |
Implement MDL_wait_for_subgraph interface.
Traverse a portion of wait-for graph which is reachable through the edge represented by this ticket and search for deadlocks.
TRUE | A deadlock is found. A pointer to deadlock victim is saved in the visitor. |
FALSE |
Implements MDL_wait_for_subgraph.
void MDL_ticket::downgrade_lock | ( | enum_mdl_type | type | ) |
Downgrade an EXCLUSIVE or SHARED_NO_WRITE lock to shared metadata lock.
type | Type of lock to which exclusive lock should be downgraded. |
uint MDL_ticket::get_deadlock_weight | ( | ) | const [virtual] |
Return the 'weight' of this ticket for the victim selection algorithm. Requests with lower weight are preferred to requests with higher weight when choosing a victim.
Implements MDL_wait_for_subgraph.
bool MDL_ticket::has_pending_conflicting_lock | ( | ) | const |
Check if we have any pending locks which conflict with existing shared lock.
bool MDL_ticket::has_stronger_or_equal_type | ( | enum_mdl_type | type | ) | const |
Check if ticket represents metadata lock of "stronger" or equal type than specified one. I.e. if metadata lock represented by ticket won't allow any of locks which are not allowed by specified type of lock.
Pointers for participating in the list of lock requests for this context. Context private.
Pointers for participating in the list of satisfied/pending requests for the lock. Externally accessible.