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

source

pub unsafe fn wsrep_report(&self, debug: bool)

source

pub unsafe fn has_pending_conflicting_lock(&self) -> bool

source

pub unsafe fn get_type_name(&self) -> *const LEX_STRING

source

pub unsafe fn get_type_name1(&self, type_: Type) -> *const LEX_STRING

source

pub unsafe fn get_key(&self) -> *mut MDL_key

source

pub unsafe fn downgrade_lock(&mut self, type_: Type)

source

pub unsafe fn has_stronger_or_equal_type(&self, type_: Type) -> bool

source

pub unsafe fn is_incompatible_when_granted(&self, type_: Type) -> bool

source

pub unsafe fn is_incompatible_when_waiting(&self, type_: Type) -> bool

Trait Implementations§

source§

impl Debug for MDL_ticket

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.