MySQL 9.1.0
Source Code Documentation
|
#include <session_tracker.h>
Public Member Functions | |
State_tracker () | |
Constructor. More... | |
virtual | ~State_tracker ()=default |
Destructor. More... | |
bool | is_enabled () const |
Getters. More... | |
bool | is_changed () const |
virtual bool | enable (THD *thd)=0 |
Called in the constructor of THD. More... | |
virtual bool | check (THD *thd, set_var *var)=0 |
To be invoked when the tracker's system variable is checked (ON_CHECK). More... | |
virtual bool | update (THD *thd)=0 |
To be invoked when the tracker's system variable is updated (ON_UPDATE). More... | |
virtual bool | store (THD *thd, String &buf)=0 |
Store changed data into the given buffer. More... | |
virtual void | mark_as_changed (THD *thd, LEX_CSTRING name)=0 |
Mark the entity as changed. More... | |
virtual void | claim_memory_ownership (bool claim) |
Protected Attributes | |
bool | m_enabled |
Is tracking enabled for a particular session state type ? More... | |
bool | m_changed |
Has the session state type changed ? More... | |
An abstract class that defines the interface for any of the server's 'session state change tracker'. A tracker, however, is a sub- class of this class which takes care of tracking the change in value of a part- icular session state type and thus defines various methods listed in this interface. The change information is later serialized and transmitted to the client through protocol's OK packet.
Tracker system variables :- A tracker is normally mapped to a system variable. So in order to enable, disable or modify the sub-entities of a tracker, the user needs to modify the respective system variable either through SET command or via command line option. As required in system variable handling, this interface also includes two functions to help in the verification of the supplied value (ON_CHECK) and the updation (ON_UPDATE) of the tracker system variable, namely - check() and update().
|
inline |
Constructor.
|
virtualdefault |
Destructor.
To be invoked when the tracker's system variable is checked (ON_CHECK).
Implemented in Current_schema_tracker, Session_gtids_tracker, Session_transaction_state, Session_state_change_tracker, Transaction_state_tracker, and Session_sysvars_tracker.
|
inlinevirtual |
Reimplemented in Session_sysvars_tracker.
|
pure virtual |
Called in the constructor of THD.
Implemented in Session_transaction_state, Session_sysvars_tracker, Current_schema_tracker, Session_gtids_tracker, Session_state_change_tracker, and Transaction_state_tracker.
|
inline |
|
inline |
Getters.
|
pure virtual |
Mark the entity as changed.
Implemented in Session_transaction_state, Session_sysvars_tracker, Current_schema_tracker, Session_gtids_tracker, Session_state_change_tracker, and Transaction_state_tracker.
Store changed data into the given buffer.
Implemented in Session_transaction_state, Session_state_change_tracker, Session_sysvars_tracker, Current_schema_tracker, Session_gtids_tracker, and Transaction_state_tracker.
|
pure virtual |
To be invoked when the tracker's system variable is updated (ON_UPDATE).
Implemented in Session_transaction_state, Session_sysvars_tracker, Current_schema_tracker, Session_gtids_tracker, Session_state_change_tracker, and Transaction_state_tracker.
|
protected |
Has the session state type changed ?
|
protected |
Is tracking enabled for a particular session state type ?