MySQL 8.4.0
Source Code Documentation
Session_gtids_tracker Class Reference
Inheritance diagram for Session_gtids_tracker:
[legend]

Public Member Functions

 Session_gtids_tracker ()
 Constructor. More...
 
 ~Session_gtids_tracker () override
 
bool enable (THD *thd) override
 Called in the constructor of THD. 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_gtids's value. More...
 
bool store (THD *thd, String &buf) override
 Store the collected gtids as length-encoded string in the specified buffer. More...
 
void mark_as_changed (THD *thd, LEX_CSTRING tracked_item_name) override
 Mark the tracker as changed. More...
 
void notify_session_gtids_ctx_change () override
 
- 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...
 
- Private Member Functions inherited from Session_consistency_gtids_ctx::Ctx_change_listener
 Ctx_change_listener ()=default
 
virtual ~Ctx_change_listener ()=default
 

Private Attributes

Session_gtids_ctx_encoderm_encoder
 

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...
 

Detailed Description

Session_gtids_tracker

This is a tracker class that enables & manages the tracking of gtids for relaying to the connectors the information needed to handle session consistency.

Constructor & Destructor Documentation

◆ Session_gtids_tracker()

Session_gtids_tracker::Session_gtids_tracker ( )
inline

Constructor.

◆ ~Session_gtids_tracker()

Session_gtids_tracker::~Session_gtids_tracker ( )
inlineoverride

Member Function Documentation

◆ check()

bool Session_gtids_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_gtids_tracker::enable ( THD thd)
inlineoverridevirtual

Called in the constructor of THD.

Implements State_tracker.

◆ mark_as_changed()

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

Mark the tracker as changed.

Parameters
thdAlways null.
tracked_item_nameAlways null.

Implements State_tracker.

◆ notify_session_gtids_ctx_change()

void Session_gtids_tracker::notify_session_gtids_ctx_change ( )
inlineoverridevirtual

◆ reset()

void Session_gtids_tracker::reset ( void  )
private

Reset the m_changed flag for next statement.

◆ store()

bool Session_gtids_tracker::store ( THD thd,
String buf 
)
overridevirtual

Store the collected gtids as length-encoded string in the specified buffer.

Once the data is stored, we reset the flags related to state-change (see reset()).

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

Implements State_tracker.

◆ update()

bool Session_gtids_tracker::update ( THD thd)
overridevirtual

Enable/disable the tracker based on @session_track_gtids's value.

Parameters
thdThe thd handle.
Returns
false (always)

Implements State_tracker.

Member Data Documentation

◆ m_encoder

Session_gtids_ctx_encoder* Session_gtids_tracker::m_encoder
private

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