MySQL 26.7.0
Source Code Documentation
mysql::csa::Session_guard Struct Reference

RAII guard for temporarily switching current_thd to a session THD. More...

#include <session_guard.h>

Public Member Functions

 Session_guard (THD *thd)
 Constructor: saves original current_thd and sets to the given thd. More...
 
 ~Session_guard ()
 Destructor: restores the original current_thd. More...
 

Private Attributes

THDm_orig_thd {nullptr}
 

Detailed Description

RAII guard for temporarily switching current_thd to a session THD.

Saves the original current_thd in ctor and restores it in dtor.

Constructor & Destructor Documentation

◆ Session_guard()

mysql::csa::Session_guard::Session_guard ( THD thd)
inline

Constructor: saves original current_thd and sets to the given thd.

◆ ~Session_guard()

mysql::csa::Session_guard::~Session_guard ( )
inline

Destructor: restores the original current_thd.

Member Data Documentation

◆ m_orig_thd

THD* mysql::csa::Session_guard::m_orig_thd {nullptr}
private

The documentation for this struct was generated from the following file: