MySQL 8.0.39
Source Code Documentation
Session_state_change_tracker Class Reference

#include <session_tracker.h>

Inheritance diagram for Session_state_change_tracker:
[legend]

Public Member Functions

 Session_state_change_tracker ()
 Constructor. More...
 
bool enable (THD *thd) override
 Initiate the value of m_enabled based on @session_track_state_change value. More...
 
bool check (THD *, set_var *) override
 To be invoked when the tracker's system variable is checked (ON_CHECK). More...
 
bool update (THD *thd) override
 Enable/disable the tracker based on @session_track_state_change value. More...
 
bool store (THD *, String &buf) override
 Store the 1byte boolean flag in the specified buffer. More...
 
void mark_as_changed (THD *thd, LEX_CSTRING tracked_item_name) override
 Mark the tracker as changed and associated session attributes accordingly. More...
 
bool is_state_changed ()
 find if there is a session state change More...
 
- Public Member Functions inherited from State_tracker
 State_tracker ()
 Constructor. More...
 
virtual ~State_tracker ()=default
 Destructor. More...
 
bool is_enabled () const
 Getters. More...
 
bool is_changed () const
 
virtual void claim_memory_ownership (bool claim)
 

Private Member Functions

void reset ()
 Reset the m_changed flag for next statement. More...
 

Additional Inherited Members

- Protected Attributes inherited from State_tracker
bool m_enabled
 Is tracking enabled for a particular session state type ? More...
 
bool m_changed
 Has the session state type changed ? More...
 

Constructor & Destructor Documentation

◆ Session_state_change_tracker()

Session_state_change_tracker::Session_state_change_tracker ( )

Constructor.

Member Function Documentation

◆ check()

bool Session_state_change_tracker::check ( THD thd,
set_var var 
)
inlineoverridevirtual

To be invoked when the tracker's system variable is checked (ON_CHECK).

Implements State_tracker.

◆ enable()

bool Session_state_change_tracker::enable ( THD thd)
overridevirtual

Initiate the value of m_enabled based on @session_track_state_change value.

Parameters
thdThe thd handle.
Returns
false (always)

Implements State_tracker.

◆ is_state_changed()

bool Session_state_change_tracker::is_state_changed ( )

find if there is a session state change

Returns
A session state change flag.
Return values
trueThere is a session state change
falseThere is no session state change

◆ mark_as_changed()

void Session_state_change_tracker::mark_as_changed ( THD thd,
LEX_CSTRING  tracked_item_name 
)
overridevirtual

Mark the tracker as changed and associated session attributes accordingly.

Implements State_tracker.

◆ reset()

void Session_state_change_tracker::reset ( void  )
private

Reset the m_changed flag for next statement.

◆ store()

bool Session_state_change_tracker::store ( THD ,
String buf 
)
overridevirtual

Store the 1byte boolean flag in the specified buffer.

Once the data is stored, we reset the flags related to state-change. If 1byte flag value is 1 then there is a session state change else there is no state change information.

Parameters
[in,out]bufBuffer to store the information to.
Returns
false Success true Error

Implements State_tracker.

◆ update()

bool Session_state_change_tracker::update ( THD thd)
overridevirtual

Enable/disable the tracker based on @session_track_state_change value.

Parameters
thdThe thd handle.
Returns
false (always)

Implements State_tracker.


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