MySQL  8.0.17
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:
set_var_base

Public Member Functions

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

Public Attributes

sys_varvar
 system variable to be updated More...
 
Itemvalue
 the expression that provides the new value of the variable More...
 
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
 
LEX_STRING base
 for structured variables, like keycache_name.variable_name More...
 

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,
sys_var var_arg,
const LEX_STRING base_name_arg,
Item value_arg 
)

Member Function Documentation

◆ check()

int set_var::check ( THD thd)
virtual

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_var_optimizer_trace()

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

Reimplemented from set_var_base.

◆ light_check()

int set_var::light_check ( THD thd)
virtual

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()

void set_var::print ( const THD thd,
String str 
)
virtual

Self-print assignment.

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

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)
virtual


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)
virtual

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 evironment 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)

Update variable source, user, host and timestamp values.

Member Data Documentation

◆ base

LEX_STRING set_var::base

for structured variables, like keycache_name.variable_name

◆ double_value

double set_var::double_value

for Sys_var_double

◆ plugin

plugin_ref set_var::plugin

for Sys_var_plugin

◆ ptr

const void* set_var::ptr

for Sys_var_struct

◆ save_result

union { ... } set_var::save_result

◆ 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

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

◆ var

sys_var* set_var::var

system variable to be updated


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