MySQL 9.1.0
Source Code Documentation
|
Classes | |
struct | sysvar_node_st |
class | vars_list |
Public Member Functions | |
Session_sysvars_tracker (const CHARSET_INFO *char_set) | |
Constructor. More... | |
~Session_sysvars_tracker () override | |
Destructor. More... | |
void | reset () |
Prepare/reset the m_registered_sysvars hash for next statement. More... | |
bool | enable (THD *thd) override |
It is responsible for enabling this tracker when a session starts. More... | |
bool | check (THD *thd, set_var *var) override |
Check if any of the system variable name(s) in the given list of system variables is duplicate/invalid. More... | |
bool | update (THD *thd) override |
Once the value of the @session_track_system_variables has been successfully updated, this function calls Session_sysvars_tracker::vars_list::update updating the hash in orig_list which represents the system variables to be tracked. More... | |
bool | store (THD *thd, String &buf) override |
Store the data for changed system variables in the specified buffer. More... | |
void | mark_as_changed (THD *thd, LEX_CSTRING tracked_item_name) override |
Mark the system variable with the specified name as changed. More... | |
void | claim_memory_ownership (bool claim) 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 |
Static Public Member Functions | |
static bool | server_init_check (const CHARSET_INFO *char_set, LEX_STRING var_list) |
Method used to check the validity of string provided for session_track_system_variables during the server startup. More... | |
static const uchar * | sysvars_get_key (const uchar *entry, size_t *length) |
Supply key to the hash implementation (to be used internally by the implementation). More... | |
Private Attributes | |
vars_list * | orig_list |
Two objects of vars_list type are maintained to manage various operations on variables_list. More... | |
vars_list * | tool_list |
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 session system variables. It internally maintains a hash of user supplied variable names and a boolean field to store if the variable was changed by the last statement.
|
inline |
Constructor.
|
inlineoverride |
Destructor.
Check if any of the system variable name(s) in the given list of system variables is duplicate/invalid.
When the value of @session_track_system_variables system variable is updated, the new value is first verified in this function (called from ON_CHECK()) and a hash is populated in tool_list.
thd | The thd handle. |
var | A pointer to set_var holding the specified list of system variable names. |
Implements State_tracker.
|
inlineoverridevirtual |
Reimplemented from State_tracker.
|
overridevirtual |
It is responsible for enabling this tracker when a session starts.
During the initialization, a session's system variable gets a copy of the global variable. The new value of session_track_system_variables is then verified & tokenized to create a hash, which is then updated to orig_list which represents all the systems variables to be tracked.
thd | The thd handle. |
Implements State_tracker.
|
overridevirtual |
Mark the system variable with the specified name as changed.
thd | Current thread |
tracked_item_name | Name of the system variable which got changed. |
Implements State_tracker.
void Session_sysvars_tracker::reset | ( | void | ) |
Prepare/reset the m_registered_sysvars hash for next statement.
|
inlinestatic |
Method used to check the validity of string provided for session_track_system_variables during the server startup.
Store the data for changed system variables 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.
|
static |
Supply key to the hash implementation (to be used internally by the implementation).
entry | A single entry. | |
[out] | length | Length of the key. |
|
overridevirtual |
Once the value of the @session_track_system_variables has been successfully updated, this function calls Session_sysvars_tracker::vars_list::update updating the hash in orig_list which represents the system variables to be tracked.
thd | The thd handle. |
Implements State_tracker.
|
private |
Two objects of vars_list type are maintained to manage various operations on variables_list.
|
private |