Struct mariadb_sys::MDL_ticket
source · #[repr(C)]pub struct MDL_ticket {
pub _base: MDL_wait_for_subgraph,
pub _base_1: ilist_node,
pub next_in_context: *mut MDL_ticket,
pub prev_in_context: *mut *mut MDL_ticket,
pub m_type: Type,
pub m_duration: Type,
pub m_ctx: *mut MDL_context,
pub m_lock: *mut MDL_lock,
pub m_psi: *mut PSI_metadata_lock,
}
Expand description
A granted metadata lock.
@warning MDL_ticket members are private to the MDL subsystem.
@note Multiple shared locks on a same object are represented by a single ticket. The same does not apply for other lock types.
@note There are two groups of MDL_ticket members:
- “Externally accessible”. These members can be accessed from threads/contexts different than ticket owner in cases when ticket participates in some list of granted or waiting tickets for a lock. Therefore one should change these members before including then to waiting/granted lists or while holding lock protecting those lists.
- “Context private”. Such members are private to thread/context owning this ticket. I.e. they should not be accessed from other threads/contexts.
Fields§
§_base: MDL_wait_for_subgraph
§_base_1: ilist_node
§next_in_context: *mut MDL_ticket
Pointers for participating in the list of lock requests for this context. Context private.
prev_in_context: *mut *mut MDL_ticket
§m_type: Type
Type of metadata lock. Externally accessible.
m_duration: Type
Duration of lock represented by this ticket. Context private. Debug-only.
m_ctx: *mut MDL_context
Context of the owner of the metadata lock ticket. Externally accessible.
m_lock: *mut MDL_lock
Pointer to the lock object for this lock ticket. Externally accessible.
m_psi: *mut PSI_metadata_lock
Implementations§
source§impl MDL_ticket
impl MDL_ticket
pub unsafe fn wsrep_report(&self, debug: bool)
pub unsafe fn has_pending_conflicting_lock(&self) -> bool
pub unsafe fn get_type_name(&self) -> *const LEX_STRING
pub unsafe fn get_type_name1(&self, type_: Type) -> *const LEX_STRING
pub unsafe fn get_key(&self) -> *mut MDL_key
pub unsafe fn downgrade_lock(&mut self, type_: Type)
pub unsafe fn has_stronger_or_equal_type(&self, type_: Type) -> bool
pub unsafe fn is_incompatible_when_granted(&self, type_: Type) -> bool
pub unsafe fn is_incompatible_when_waiting(&self, type_: Type) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MDL_ticket
impl !Send for MDL_ticket
impl !Sync for MDL_ticket
impl Unpin for MDL_ticket
impl !UnwindSafe for MDL_ticket
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more