MySQL 8.0.40
Source Code Documentation
|
An interface to separate the MDL module from the THD, and the rest of the server code. More...
#include <mdl.h>
Public Member Functions | |
virtual | ~MDL_context_owner ()=default |
virtual void | enter_cond (mysql_cond_t *cond, mysql_mutex_t *mutex, const PSI_stage_info *stage, PSI_stage_info *old_stage, const char *src_function, const char *src_file, int src_line)=0 |
Enter a condition wait. More... | |
virtual void | exit_cond (const PSI_stage_info *stage, const char *src_function, const char *src_file, int src_line)=0 |
End a wait on a condition. More... | |
virtual int | is_killed () const =0 |
Has the owner thread been killed? More... | |
virtual bool | is_connected (bool=false)=0 |
Does the owner still have connection to the client? More... | |
virtual bool | might_have_commit_order_waiters () const =0 |
Indicates that owner thread might have some commit order (non-MDL) waits for it which are still taken into account by MDL deadlock detection, even in cases when it doesn't have any MDL locks acquired and therefore can't have any MDL waiters. More... | |
virtual THD * | get_thd ()=0 |
Within MDL subsystem this one is only used for DEBUG_SYNC. More... | |
virtual void | notify_shared_lock (MDL_context_owner *in_use, bool needs_thr_lock_abort)=0 |
virtual bool | notify_hton_pre_acquire_exclusive (const MDL_key *mdl_key, bool *victimized)=0 |
Notify/get permission from interested storage engines before acquiring exclusive lock for the key. More... | |
virtual void | notify_hton_post_release_exclusive (const MDL_key *mdl_key)=0 |
Notify interested storage engines that we have just released exclusive lock for the key. More... | |
virtual uint | get_rand_seed () const =0 |
Get random seed specific to this THD to be used for initialization of PRNG for the MDL_context. More... | |
An interface to separate the MDL module from the THD, and the rest of the server code.
|
virtualdefault |
|
pure virtual |
Enter a condition wait.
For enter_cond()
/ exit_cond()
to work the mutex must be held before enter_cond()
; this mutex must then be released before exit_cond()
. Usage must be: lock mutex; enter_cond(); your code; unlock mutex; exit_cond().
cond | the condition to wait on | |
mutex | the associated mutex | |
[in] | stage | the stage to enter, or NULL |
[out] | old_stage | the previous stage, or NULL |
src_function | function name of the caller | |
src_file | file name of the caller | |
src_line | line number of the caller |
Implemented in MDL_context_backup_manager::MDL_context_backup, and THD.
|
pure virtual |
End a wait on a condition.
[in] | stage | the new stage to enter |
src_function | function name of the caller | |
src_file | file name of the caller | |
src_line | line number of the caller |
Implemented in MDL_context_backup_manager::MDL_context_backup, and THD.
|
pure virtual |
Get random seed specific to this THD to be used for initialization of PRNG for the MDL_context.
Implemented in MDL_context_backup_manager::MDL_context_backup, and THD.
|
pure virtual |
Within MDL subsystem this one is only used for DEBUG_SYNC.
Do not use it to peek/poke into other parts of THD from MDL. However it is OK to use this method in callbacks provided by SQL-layer to MDL subsystem (since SQL-layer has full access to THD anyway).
Implemented in MDL_context_backup_manager::MDL_context_backup, and THD.
|
pure virtual |
Does the owner still have connection to the client?
Implemented in THD, and MDL_context_backup_manager::MDL_context_backup.
|
pure virtual |
Has the owner thread been killed?
Implemented in THD, and MDL_context_backup_manager::MDL_context_backup.
|
pure virtual |
Indicates that owner thread might have some commit order (non-MDL) waits for it which are still taken into account by MDL deadlock detection, even in cases when it doesn't have any MDL locks acquired and therefore can't have any MDL waiters.
Implemented in MDL_context_backup_manager::MDL_context_backup, and THD.
|
pure virtual |
Notify interested storage engines that we have just released exclusive lock for the key.
Implemented in MDL_context_backup_manager::MDL_context_backup, and THD.
|
pure virtual |
Notify/get permission from interested storage engines before acquiring exclusive lock for the key.
The returned argument 'victimized' specify reason for lock not granted. If 'true', lock was refused in an attempt to resolve a possible MDL->GSL deadlock. Locking may then be retried.
Implemented in MDL_context_backup_manager::MDL_context_backup, and THD.
|
pure virtual |
Implemented in MDL_context_backup_manager::MDL_context_backup, and THD.