![]() |
MySQL 9.5.0
Source Code Documentation
|
RAII guard that sets a thread stage, and restores the previous stage when going out of scope. More...
#include <thread_stage_guard.h>
Public Member Functions | |
| Thread_stage_guard ()=delete | |
| Thread_stage_guard (THD *thd, const PSI_stage_info &new_stage, const char *func, const char *file, const unsigned int line) | |
| Set the given stage for the session, and remember the previous stage in a member variable. More... | |
| Thread_stage_guard (const Thread_stage_guard &)=delete | |
| Thread_stage_guard (Thread_stage_guard &&)=delete | |
| Thread_stage_guard & | operator= (const Thread_stage_guard &)=delete |
| Thread_stage_guard & | operator= (Thread_stage_guard &&)=delete |
| void | set_old_stage () const |
| Revert back to the old stage before this object goes out of scope. More... | |
| void | set_new_stage () const |
| Restore the new stage, in case set_old_stage was used earlier. More... | |
| ~Thread_stage_guard () | |
| Revert the old stage that was used before this object's constructor was invoked. More... | |
Private Attributes | |
| PSI_stage_info | m_old_stage |
| The previous stage. More... | |
| PSI_stage_info | m_new_stage |
| The new stage. More... | |
| THD * | m_thd |
| The session. More... | |
| const char * | m_func |
| The name of the calling function. More... | |
| const char * | m_file |
| The filename of the caller. More... | |
| const unsigned int | m_line |
| The Line number of the caller. More... | |
RAII guard that sets a thread stage, and restores the previous stage when going out of scope.
|
delete |
|
inline |
Set the given stage for the session, and remember the previous stage in a member variable.
| [in,out] | thd | Session object that should change stage. |
| new_stage | The new stage to use for THD. | |
| func | Name of the calling function. | |
| file | Filename of the caller. | |
| line | Line number of the caller. |
|
delete |
|
delete |
|
inline |
Revert the old stage that was used before this object's constructor was invoked.
|
delete |
|
delete |
|
inline |
Restore the new stage, in case set_old_stage was used earlier.
|
inline |
Revert back to the old stage before this object goes out of scope.
|
private |
The filename of the caller.
|
private |
The name of the calling function.
|
private |
The Line number of the caller.
|
private |
The new stage.
|
private |
The previous stage.
|
private |
The session.