MySQL 8.4.2
Source Code Documentation
Session_tracker Class Reference

#include <session_tracker.h>

Public Member Functions

 Session_tracker (Session_tracker const &)=delete
 
Session_trackeroperator= (Session_tracker const &)=delete
 
 Session_tracker ()=default
 Constructor. More...
 
 ~Session_tracker ()=default
 Destructor. More...
 
void init (const CHARSET_INFO *char_set)
 Initialize Session_tracker objects and enable them based on the tracker_xxx variables' value that the session inherit from global variables at the time of session initialization (see plugin_thdvar_init). More...
 
void enable (THD *thd)
 Enables the tracker objects. More...
 
bool server_boot_verify (const CHARSET_INFO *char_set, LEX_STRING var_list)
 Method called during the server startup to verify the contents of @session_track_system_variables. More...
 
State_trackerget_tracker (enum_session_tracker tracker) const
 Returns the pointer to the tracker object for the specified tracker. More...
 
bool enabled_any ()
 Checks if m_enabled flag is set for any of the tracker objects. More...
 
bool changed_any ()
 Checks if m_changed flag is set for any of the tracker objects. More...
 
void store (THD *thd, String &main_buf)
 Stores the session state change information of all changes session state type entities into the specified buffer. More...
 
void deinit ()
 
void claim_memory_ownership (bool claim)
 

Private Attributes

State_trackerm_trackers [SESSION_TRACKER_END+1]
 

Detailed Description

Session_tracker

This class holds an object each for all tracker classes and provides methods necessary for systematic detection and generation of session state change information.

Constructor & Destructor Documentation

◆ Session_tracker() [1/2]

Session_tracker::Session_tracker ( Session_tracker const &  )
delete

◆ Session_tracker() [2/2]

Session_tracker::Session_tracker ( )
default

Constructor.

◆ ~Session_tracker()

Session_tracker::~Session_tracker ( )
default

Destructor.

Member Function Documentation

◆ changed_any()

bool Session_tracker::changed_any ( )

Checks if m_changed flag is set for any of the tracker objects.

Returns
true At least one of the entities being tracker has changed. false None of the entities being tracked has changed.

◆ claim_memory_ownership()

void Session_tracker::claim_memory_ownership ( bool  claim)

◆ deinit()

void Session_tracker::deinit ( void  )
inline

◆ enable()

void Session_tracker::enable ( THD thd)

Enables the tracker objects.

Parameters
thdThe thread handle.

◆ enabled_any()

bool Session_tracker::enabled_any ( )

Checks if m_enabled flag is set for any of the tracker objects.

Returns
true - At least one of the trackers is enabled. false - None of the trackers is enabled.

◆ get_tracker()

State_tracker * Session_tracker::get_tracker ( enum_session_tracker  tracker) const

Returns the pointer to the tracker object for the specified tracker.

Parameters
trackerTracker type.
Returns
Pointer to the tracker object.

◆ init()

void Session_tracker::init ( const CHARSET_INFO char_set)

Initialize Session_tracker objects and enable them based on the tracker_xxx variables' value that the session inherit from global variables at the time of session initialization (see plugin_thdvar_init).

Initialize session tracker objects.

Parameters
char_setThe character set info.

◆ operator=()

Session_tracker & Session_tracker::operator= ( Session_tracker const &  )
delete

◆ server_boot_verify()

bool Session_tracker::server_boot_verify ( const CHARSET_INFO char_set,
LEX_STRING  var_list 
)

Method called during the server startup to verify the contents of @session_track_system_variables.

Parameters
char_setThe character set info.
var_listValue of @session_track_system_variables.
Returns
false Success true failure

◆ store()

void Session_tracker::store ( THD thd,
String buf 
)

Stores the session state change information of all changes session state type entities into the specified buffer.

Store all change information in the specified buffer.

Parameters
thdThe thd handle.
[out]bufReference to the string buffer to which the state change data needs to be written.

Member Data Documentation

◆ m_trackers

State_tracker* Session_tracker::m_trackers[SESSION_TRACKER_END+1]
private

The documentation for this class was generated from the following files: