MySQL 8.0.31
Source Code Documentation
set_var Class Reference

set_var_base descendant for assignments to the system variables. More...

#include <set_var.h>

Inheritance diagram for set_var:
[legend]

Public Member Functions

 set_var (enum_var_type type_arg, const System_variable_tracker &var_arg, Item *value_arg)
 
int resolve (THD *thd) override
 Resolve the variable assignment. More...
 
int check (THD *thd) override
 Verify that the supplied value is correct. More...
 
int update (THD *thd) override
 Update variable. More...
 
int light_check (THD *thd) override
 Check variable, but without assigning value (used by PS). More...
 
void print_short (const THD *thd, String *str)
 Print variable in short form. More...
 
bool print (const THD *, String *str) override
 Self-print assignment. More...
 
bool is_global_persist ()
 
bool is_var_optimizer_trace () const override
 
bool is_sensitive () const override
 Check if system variable is of type SENSITIVE. More...
 
void update_source_user_host_timestamp (THD *thd, sys_var *var)
 Update variable source, user, host and timestamp values. More...
 
- Public Member Functions inherited from set_var_base
 set_var_base ()=default
 
virtual ~set_var_base ()=default
 
virtual void cleanup ()
 

Public Attributes

Itemvalue
 the expression that provides the new value of the variable More...
 
const enum_var_type type
 
union {
   ulonglong   ulonglong_value
 for all integer, set, enum sysvars More...
 
   double   double_value
 for Sys_var_double More...
 
   plugin_ref   plugin
 for Sys_var_plugin More...
 
   Time_zone *   time_zone
 for Sys_var_tz More...
 
   LEX_STRING   string_value
 for Sys_var_charptr and others More...
 
   const void *   ptr
 for Sys_var_struct More...
 
save_result
 Resolver of the variable at the left hand side of the assignment. More...
 
const System_variable_tracker m_var_tracker
 

Detailed Description

set_var_base descendant for assignments to the system variables.

Constructor & Destructor Documentation

◆ set_var()

set_var::set_var ( enum_var_type  type_arg,
const System_variable_tracker var_arg,
Item value_arg 
)
inline

Member Function Documentation

◆ check()

int set_var::check ( THD thd)
overridevirtual

Verify that the supplied value is correct.

Parameters
thdThread handler
Returns
status code
Return values
-1Failure
0Success

Implements set_var_base.

◆ is_global_persist()

bool set_var::is_global_persist ( )
inline

◆ is_sensitive()

bool set_var::is_sensitive ( ) const
overridevirtual

Check if system variable is of type SENSITIVE.

Returns
If variable is sensitive or not

Reimplemented from set_var_base.

◆ is_var_optimizer_trace()

bool set_var::is_var_optimizer_trace ( ) const
inlineoverridevirtual
Returns
whether this variable is @@optimizer_trace.

Reimplemented from set_var_base.

◆ light_check()

int set_var::light_check ( THD thd)
overridevirtual

Check variable, but without assigning value (used by PS).

Parameters
thdthread handler
Return values
0ok
1ERROR, message sent (normally no variables was updated)
-1ERROR, message not sent

Reimplemented from set_var_base.

◆ print()

bool set_var::print ( const THD thd,
String str 
)
overridevirtual

Self-print assignment.

Parameters
thdThread handle
strString buffer to append the partial assignment to.
Returns
status of rewritten

Implements set_var_base.

◆ print_short()

void set_var::print_short ( const THD thd,
String str 
)

Print variable in short form.

Parameters
thdThread handle.
strString buffer to append the partial assignment to.

◆ resolve()

int set_var::resolve ( THD thd)
overridevirtual

Resolve the variable assignment.

Parameters
thdThread handler
Returns
status code
Return values
-1Failure
0Success

Implements set_var_base.

◆ update()

int set_var::update ( THD thd)
overridevirtual

Update variable.

Parameters
thdthread handler
Returns
0|1 ok or ERROR
Note
ERROR can be only due to abnormal operations involving the server's execution environment such as out of memory, hard disk failure or the computer blows up. Consider set_var::check() method if there is a need to return an error due to logics.

Implements set_var_base.

◆ update_source_user_host_timestamp()

void set_var::update_source_user_host_timestamp ( THD thd,
sys_var var 
)

Update variable source, user, host and timestamp values.

Member Data Documentation

◆ double_value

double set_var::double_value

for Sys_var_double

◆ m_var_tracker

const System_variable_tracker set_var::m_var_tracker

◆ plugin

plugin_ref set_var::plugin

for Sys_var_plugin

◆ ptr

const void* set_var::ptr

for Sys_var_struct

◆ 

union { ... } set_var::save_result

Resolver of the variable at the left hand side of the assignment.

◆ string_value

LEX_STRING set_var::string_value

for Sys_var_charptr and others

◆ time_zone

Time_zone* set_var::time_zone

for Sys_var_tz

◆ type

const enum_var_type set_var::type

◆ ulonglong_value

ulonglong set_var::ulonglong_value

for all integer, set, enum sysvars

◆ value

Item* set_var::value

the expression that provides the new value of the variable


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