MySQL 8.4.3
Source Code Documentation
|
A reliable way to wait on an MDL lock. More...
#include <mdl.h>
Public Types | |
enum | enum_wait_status { WS_EMPTY = 0 , GRANTED , VICTIM , TIMEOUT , KILLED } |
Public Member Functions | |
MDL_wait () | |
Construct an empty wait slot. More... | |
~MDL_wait () | |
Destroy system resources. More... | |
bool | set_status (enum_wait_status result_arg) |
Set the status unless it's already set. More... | |
enum_wait_status | get_status () |
Query the current value of the wait slot. More... | |
void | reset_status () |
Clear the current value of the wait slot. More... | |
enum_wait_status | timed_wait (MDL_context_owner *owner, struct timespec *abs_timeout, bool signal_timeout, const PSI_stage_info *wait_state_name) |
Wait for the status to be assigned to this wait slot. More... | |
Private Attributes | |
mysql_mutex_t | m_LOCK_wait_status |
Condvar which is used for waiting until this context's pending request can be satisfied or this thread has to perform actions to resolve a potential deadlock (we subscribe to such notification by adding a ticket corresponding to the request to an appropriate queue of waiters). More... | |
mysql_cond_t | m_COND_wait_status |
enum_wait_status | m_wait_status |
A reliable way to wait on an MDL lock.
MDL_wait::MDL_wait | ( | ) |
Construct an empty wait slot.
MDL_wait::~MDL_wait | ( | ) |
Destroy system resources.
MDL_wait::enum_wait_status MDL_wait::get_status | ( | ) |
Query the current value of the wait slot.
void MDL_wait::reset_status | ( | ) |
Clear the current value of the wait slot.
bool MDL_wait::set_status | ( | enum_wait_status | status_arg | ) |
Set the status unless it's already set.
Return false if set, true otherwise.
MDL_wait::enum_wait_status MDL_wait::timed_wait | ( | MDL_context_owner * | owner, |
struct timespec * | abs_timeout, | ||
bool | set_status_on_timeout, | ||
const PSI_stage_info * | wait_state_name | ||
) |
Wait for the status to be assigned to this wait slot.
owner | MDL context owner. |
abs_timeout | Absolute time after which waiting should stop. |
set_status_on_timeout | true - If in case of timeout waiting context should close the wait slot by sending TIMEOUT to itself. false - Otherwise. |
wait_state_name | Thread state name to be set for duration of wait. |
|
private |
|
private |
Condvar which is used for waiting until this context's pending request can be satisfied or this thread has to perform actions to resolve a potential deadlock (we subscribe to such notification by adding a ticket corresponding to the request to an appropriate queue of waiters).
|
private |