MySQL 8.0.39
Source Code Documentation
|
Class representing a lock on free_intervals_mutex. More...
Public Member Functions | |
Free_intervals_lock (Gtid_set *_gtid_set) | |
Create a new lock, but do not acquire it. More... | |
void | lock_if_not_locked () |
Lock the lock if it is not already locked. More... | |
void | unlock_if_locked () |
Lock the lock if it is locked. More... | |
~Free_intervals_lock () | |
Destroy this object and unlock the lock if it is locked. More... | |
Private Attributes | |
Gtid_set * | gtid_set |
bool | locked |
Class representing a lock on free_intervals_mutex.
This is used by the add_* and remove_* functions. The lock is declared by the top-level function and a pointer to the lock is passed down to low-level functions. If the low-level function decides to access the free intervals list, then it acquires the lock. The lock is then automatically released by the destructor when the top-level function returns.
The lock is not taken if Gtid_set->sid_lock == NULL; such Gtid_sets are assumed to be thread-local.
|
inline |
Create a new lock, but do not acquire it.
|
inline |
Destroy this object and unlock the lock if it is locked.
|
inline |
Lock the lock if it is not already locked.
|
inline |
Lock the lock if it is locked.
|
private |
|
private |