My Project
Public Member Functions | Public Attributes
set_var Class Reference

#include <set_var.h>

Inheritance diagram for set_var:
set_var_base Sql_alloc

List of all members.

Public Member Functions

 set_var (enum_var_type type_arg, sys_var *var_arg, const LEX_STRING *base_name_arg, Item *value_arg)
int check (THD *thd)
int update (THD *thd)
int light_check (THD *thd)
void print (THD *thd, String *str)

Public Attributes

sys_varvar
 system variable to be updated
Itemvalue
 the expression that provides the new value of the variable
enum_var_type type
union {
   ulonglong   ulonglong_value
 for all integer, set, enum sysvars
   double   double_value
 for Sys_var_double
   plugin_ref   plugin
 for Sys_var_plugin
   Time_zone *   time_zone
 for Sys_var_tz
   LEX_STRING   string_value
 for Sys_var_charptr and others
   const void *   ptr
 for Sys_var_struct
save_result
LEX_STRING base

Detailed Description

set_var_base descendant for assignments to the system variables.


Member Function Documentation

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.

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.

void set_var::print ( THD *  thd,
String str 
) [virtual]

Self-print assignment

Parameters:
strstring buffer to append the partial assignment to

Implements set_var_base.

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.


Member Data Documentation

LEX_STRING set_var::base

for structured variables, like keycache_name.variable_name


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines