MySQL 8.0.39
Source Code Documentation
|
Public Member Functions | |
Current_schema_tracker () | |
Constructor. More... | |
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_schema's value. More... | |
bool | store (THD *thd, String &buf) override |
Store the schema name 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... | |
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 Attributes | |
bool | schema_track_inited |
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... | |
This is a tracker class that enables & manages the tracking of current schema for a particular connection.
|
inline |
Constructor.
To be invoked when the tracker's system variable is checked (ON_CHECK).
Implements State_tracker.
|
inlineoverridevirtual |
Called in the constructor of THD.
Implements State_tracker.
|
overridevirtual |
Mark the tracker as changed.
thd | Current thread |
tracked_item_name | Always null (unused). |
Implements State_tracker.
|
private |
Reset the m_changed flag for next statement.
Store the schema name as length-encoded string in the specified buffer.
Once the data is stored, we reset the flags related to state-change (see reset()).
thd | The thd handle. | |
[in,out] | buf | Buffer to store the information to. |
Implements State_tracker.
|
overridevirtual |
Enable/disable the tracker based on @session_track_schema's value.
thd | The thd handle. |
Implements State_tracker.
|
private |