MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Sys_var_bit Class Reference

#include <sys_vars.h>

Inheritance diagram for Sys_var_bit:
Collaboration diagram for Sys_var_bit:

Public Member Functions

 Sys_var_bit (const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, ulonglong bitmask_arg, my_bool def_val, PolyLock *lock=0, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=0, on_update_function on_update_func=0, const char *substitute=0)
bool session_update (THD *thd, set_var *var)
bool global_update (THD *thd, set_var *var)
void session_save_default (THD *thd, set_var *var)
void global_save_default (THD *thd, set_var *var)
uchar * session_value_ptr (THD *thd, LEX_STRING *base)
uchar * global_value_ptr (THD *thd, LEX_STRING *base)
- Public Member Functions inherited from Sys_var_typelib
 Sys_var_typelib (const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, CMD_LINE getopt, SHOW_TYPE show_val_type_arg, const char *values[], ulonglong def_val, PolyLock *lock, enum binlog_status_enum binlog_status_arg, on_check_function on_check_func, on_update_function on_update_func, const char *substitute, int parse_flag=PARSE_NORMAL)
bool do_check (THD *thd, set_var *var)
bool check_update_type (Item_result type)
- Public Member Functions inherited from sys_var
 sys_var (sys_var_chain *chain, const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, int getopt_id, enum get_opt_arg_type getopt_arg_type, SHOW_TYPE show_val_type_arg, longlong def_val, PolyLock *lock, enum binlog_status_enum binlog_status_arg, on_check_function on_check_func, on_update_function on_update_func, const char *substitute, int parse_flag)
virtual void cleanup ()
virtual sys_var_pluginvarcast_pluginvar ()
bool check (THD *thd, set_var *var)
uchar * value_ptr (THD *thd, enum_var_type type, LEX_STRING *base)
virtual void update_default (longlong new_def_value)
bool set_default (THD *thd, set_var *var)
bool update (THD *thd, set_var *var)
SHOW_TYPE show_type ()
int scope () const
const CHARSET_INFOcharset (THD *thd)
bool is_readonly () const
bool not_visible () const
bool is_struct ()
bool is_written_to_binlog (enum_var_type type)
bool check_type (enum_var_type type)
bool register_option (std::vector< my_option > *array, int parse_flags)
void do_deprecated_warning (THD *thd)

Additional Inherited Members

- Public Types inherited from sys_var
enum  flag_enum {
  GLOBAL, SESSION, ONLY_SESSION, SCOPE_MASK = 1023,
  READONLY = 1024, ALLOCATED = 2048, INVISIBLE = 4096
}
enum  binlog_status_enum { VARIABLE_NOT_IN_BINLOG, SESSION_VARIABLE_IN_BINLOG }
- Public Attributes inherited from sys_var
sys_varnext
LEX_CSTRING name
enum sys_var::binlog_status_enum binlog_status
- Static Public Attributes inherited from sys_var
static const int PARSE_EARLY = 1
static const int PARSE_NORMAL = 2
- Protected Types inherited from sys_var
typedef bool(* on_check_function )(sys_var *self, THD *thd, set_var *var)
typedef bool(* on_update_function )(sys_var *self, THD *thd, enum_var_type type)
- Protected Member Functions inherited from sys_var
uchar * session_var_ptr (THD *thd)
uchar * global_var_ptr ()
- Protected Attributes inherited from Sys_var_typelib
TYPELIB typelib

Detailed Description

The class for bit variables - a variant of boolean that stores the value in a bit.

Class specific constructor arguments: ulonglong bitmask_arg - the mask for the bit to set in the ulonglong backing store

Backing store: ulonglong

Note
This class supports the "reverse" semantics, when the value of the bit being 0 corresponds to the value of variable being set. To activate it use REVERSE(bitmask) instead of simply bitmask in the constructor.
variables of this class cannot be set from the command line as my_getopt does not support bits.

Definition at line 1345 of file sys_vars.h.

Member Function Documentation

void Sys_var_bit::global_save_default ( THD *  thd,
set_var var 
)
inlinevirtual

save the global default value of the variable in var

Implements sys_var.

Definition at line 1390 of file sys_vars.h.

void Sys_var_bit::session_save_default ( THD *  thd,
set_var var 
)
inlinevirtual

save the session default value of the variable in var

Implements sys_var.

Definition at line 1388 of file sys_vars.h.

uchar* Sys_var_bit::session_value_ptr ( THD *  thd,
LEX_STRING base 
)
inlinevirtual

A pointer to a value of the variable for SHOW. It must be of show_val_type type (bool for SHOW_BOOL, int for SHOW_INT, longlong for SHOW_LONGLONG, etc).

Reimplemented from sys_var.

Definition at line 1392 of file sys_vars.h.


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