MySQL  8.0.18
Source Code Documentation
sys_vars.h File Reference

"private" interface to sys_var - server configuration variables. More...

#include "my_config.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "keycache.h"
#include "lex_string.h"
#include "m_ctype.h"
#include "my_base.h"
#include "my_bit.h"
#include "my_compiler.h"
#include "my_dbug.h"
#include "my_getopt.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "mysql/plugin.h"
#include "mysql/service_mysql_alloc.h"
#include "mysql/status_var.h"
#include "mysql/udf_registration_types.h"
#include "mysqld_error.h"
#include "sql/auth/sql_security_ctx.h"
#include "sql/debug_sync.h"
#include "sql/handler.h"
#include "sql/item.h"
#include "sql/keycaches.h"
#include "sql/mysqld.h"
#include "sql/rpl_gtid.h"
#include "sql/set_var.h"
#include "sql/sql_class.h"
#include "sql/sql_connect.h"
#include "sql/sql_const.h"
#include "sql/sql_error.h"
#include "sql/sql_plugin.h"
#include "sql/sql_plugin_ref.h"
#include "sql/strfunc.h"
#include "sql/sys_vars_resource_mgr.h"
#include "sql/sys_vars_shared.h"
#include "sql/tztime.h"
#include "sql_string.h"
#include "typelib.h"

Go to the source code of this file.

Classes

class  Sys_var_struct< Struct_type, Name_getter >
 Generic class for variables for storing entities that are internally represented as structures, have names, and possibly can be referred to by numbers. More...
 
class  Sys_var_integer< T, ARGT, SHOWT, SIGNED >
 Sys_var_integer template is used to generate Sys_var_* classes for variables that represent the value as a signed or unsigned integer. More...
 
struct  CMD_LINE
 A small wrapper class to pass getopt arguments as a pair to the Sys_var_* constructors. More...
 
class  Sys_var_integer< T, ARGT, SHOWT, SIGNED >
 Sys_var_integer template is used to generate Sys_var_* classes for variables that represent the value as a signed or unsigned integer. More...
 
class  Sys_var_typelib
 Helper class for variables that take values from a TYPELIB. More...
 
class  Sys_var_enum
 The class for ENUM variables - variables that take one value from a fixed list of values. More...
 
class  Sys_var_bool
 The class for boolean variables - a variant of ENUM variables with the fixed list of values of { OFF , ON }. More...
 
class  Sys_var_multi_enum
 A variant of enum where: More...
 
struct  Sys_var_multi_enum::ALIAS
 
class  Sys_var_charptr
 The class for string variables. More...
 
class  Sys_var_version
 
class  Sys_var_proxy_user
 
class  Sys_var_external_user
 
class  Sys_var_lexstring
 The class for string variables. More...
 
class  Sys_var_dbug
 @session.dbug and @global.dbug variables. More...
 
class  Sys_var_keycache
 The class for keycache_* variables. More...
 
class  Sys_var_double
 The class for floating point variables. More...
 
class  Sys_var_test_flag
 The class for test_flags (core_file for now). More...
 
class  Sys_var_max_user_conn
 The class for the max_user_connections. More...
 
class  Sys_var_flagset
 The class for flagset variables - a variant of SET that allows in-place editing (turning on/off individual bits). More...
 
class  Sys_var_set
 The class for SET variables - variables taking zero or more values from the given list. More...
 
class  Sys_var_plugin
 The class for variables which value is a plugin. More...
 
class  Sys_var_bit
 The class for bit variables - a variant of boolean that stores the value in a bit. More...
 
class  Sys_var_session_special
 The class for variables that have a special meaning for a session, such as @timestamp or @rnd_seed1, their values typically cannot be read from SV structure, and a special "read" callback is provided. More...
 
class  Sys_var_session_special_double
 Similar to Sys_var_session_special, but with double storage. More...
 
class  Sys_var_have
 The class for read-only variables that show whether a particular feature is supported by the server. More...
 
class  Sys_var_have_func
 A subclass of Sys_var_have to return dynamic values. More...
 
class  Sys_var_struct< Struct_type, Name_getter >
 Generic class for variables for storing entities that are internally represented as structures, have names, and possibly can be referred to by numbers. More...
 
class  Sys_var_tz
 The class for variables that store time zones. More...
 
class  Sys_var_transaction_isolation
 Class representing the 'transaction_isolation' system variable. More...
 
class  Sys_var_transaction_read_only
 Class representing the tx_read_only system variable for setting default transaction access mode. More...
 
class  Sys_var_enum_binlog_checksum
 A class for @global.binlog_checksum that has a specialized update method. More...
 
class  Sys_var_gtid_next
 Class for gtid_next. More...
 
class  Sys_var_charptr_func
 Abstract base class for read-only variables (global or session) of string type where the value is generated by some function. More...
 
class  Sys_var_gtid_executed
 Class for @global.gtid_executed. More...
 
class  Sys_var_gtid_purged
 Class for @session.gtid_purged. More...
 
class  Sys_var_gtid_owned
 
class  Sys_var_gtid_mode
 
class  Sys_var_enforce_gtid_consistency
 
class  Sys_var_binlog_encryption
 

Macros

#define VALID_RANGE(X, Y)   X, Y
 
#define DEFAULT(X)   X
 
#define BLOCK_SIZE(X)   X
 
#define GLOBAL_VAR(X)
 
#define SESSION_VAR(X)
 
#define SESSION_ONLY(X)
 
#define NO_CMD_LINE   CMD_LINE(NO_ARG, -1)
 
#define NO_MUTEX_GUARD   ((PolyLock *)0)
 
#define IN_BINLOG   sys_var::SESSION_VARIABLE_IN_BINLOG
 
#define NOT_IN_BINLOG   sys_var::VARIABLE_NOT_IN_BINLOG
 
#define ON_READ(X)   X
 
#define ON_CHECK(X)   X
 
#define ON_UPDATE(X)   X
 
#define READ_ONLY   sys_var::READONLY +
 
#define NOT_VISIBLE   sys_var::INVISIBLE +
 
#define UNTRACKED_DEFAULT   sys_var::TRI_LEVEL +
 
#define HINT_UPDATEABLE   sys_var::HINT_UPDATEABLE +
 
#define PREALLOCATED   sys_var::ALLOCATED +
 
#define NON_PERSIST   sys_var::NOTPERSIST +
 
#define PERSIST_AS_READONLY   sys_var::PERSIST_AS_READ_ONLY +
 
#define REVERSE(X)   ~(X)
 
#define DEPRECATED_VAR(X)   X
 
#define session_var(THD, TYPE)   (*(TYPE *)session_var_ptr(THD))
 
#define global_var(TYPE)   (*(TYPE *)global_var_ptr())
 
#define GET_HA_ROWS   GET_ULONG
 
#define KEYCACHE_VAR(X)   sys_var::GLOBAL, offsetof(KEY_CACHE, X), sizeof(((KEY_CACHE *)0)->X)
 
#define keycache_var_ptr(KC, OFF)   (((uchar *)(KC)) + (OFF))
 
#define keycache_var(KC, OFF)   (*(ulonglong *)keycache_var_ptr(KC, OFF))
 
#define MAX_SET(X)   ((((1ULL << ((X)-1)) - 1) << 1) | 1)
 

Typedefs

typedef Sys_var_integer< int32, GET_UINT, SHOW_INT, falseSys_var_int32
 
typedef Sys_var_integer< uint, GET_UINT, SHOW_INT, falseSys_var_uint
 
typedef Sys_var_integer< ulong, GET_ULONG, SHOW_LONG, falseSys_var_ulong
 
typedef Sys_var_integer< ha_rows, GET_HA_ROWS, SHOW_HA_ROWS, falseSys_var_harows
 
typedef Sys_var_integer< ulonglong, GET_ULL, SHOW_LONGLONG, falseSys_var_ulonglong
 
typedef Sys_var_integer< long, GET_LONG, SHOW_SIGNED_LONG, trueSys_var_long
 
typedef bool(* keycache_update_function) (THD *, KEY_CACHE *, ptrdiff_t, ulonglong)
 

Enumerations

enum  charset_enum { IN_SYSTEM_CHARSET, IN_FS_CHARSET }
 

Functions

const char * fixup_enforce_gtid_consistency_command_line (char *value_arg)
 

Variables

sys_var_chain all_sys_vars
 
static const char * bool_values [3] = {"OFF", "ON", 0}
 

Detailed Description

"private" interface to sys_var - server configuration variables.

This header is included only by the file that contains declarations of sys_var variables (sys_vars.cc).

Macro Definition Documentation

◆ BLOCK_SIZE

#define BLOCK_SIZE (   X)    X

◆ DEFAULT

#define DEFAULT (   X)    X

◆ DEPRECATED_VAR

#define DEPRECATED_VAR (   X)    X

◆ GET_HA_ROWS

#define GET_HA_ROWS   GET_ULONG

◆ GLOBAL_VAR

#define GLOBAL_VAR (   X)
Value:
sys_var::GLOBAL, (((const char *)&(X)) - (char *)&global_system_variables), \
sizeof(X)
Definition: set_var.h:107
#define X(b)
Definition: xcom_base.c:5463
struct System_variables global_system_variables
Definition: mysqld.cc:1310

◆ global_var

#define global_var (   TYPE)    (*(TYPE *)global_var_ptr())

◆ HINT_UPDATEABLE

#define HINT_UPDATEABLE   sys_var::HINT_UPDATEABLE +

◆ IN_BINLOG

#define IN_BINLOG   sys_var::SESSION_VARIABLE_IN_BINLOG

◆ KEYCACHE_VAR

#define KEYCACHE_VAR (   X)    sys_var::GLOBAL, offsetof(KEY_CACHE, X), sizeof(((KEY_CACHE *)0)->X)

◆ keycache_var

#define keycache_var (   KC,
  OFF 
)    (*(ulonglong *)keycache_var_ptr(KC, OFF))

◆ keycache_var_ptr

#define keycache_var_ptr (   KC,
  OFF 
)    (((uchar *)(KC)) + (OFF))

◆ MAX_SET

#define MAX_SET (   X)    ((((1ULL << ((X)-1)) - 1) << 1) | 1)

◆ NO_CMD_LINE

#define NO_CMD_LINE   CMD_LINE(NO_ARG, -1)

◆ NO_MUTEX_GUARD

#define NO_MUTEX_GUARD   ((PolyLock *)0)

◆ NON_PERSIST

#define NON_PERSIST   sys_var::NOTPERSIST +

◆ NOT_IN_BINLOG

#define NOT_IN_BINLOG   sys_var::VARIABLE_NOT_IN_BINLOG

◆ NOT_VISIBLE

#define NOT_VISIBLE   sys_var::INVISIBLE +

◆ ON_CHECK

#define ON_CHECK (   X)    X

◆ ON_READ

#define ON_READ (   X)    X

◆ ON_UPDATE

#define ON_UPDATE (   X)    X

◆ PERSIST_AS_READONLY

#define PERSIST_AS_READONLY   sys_var::PERSIST_AS_READ_ONLY +

◆ PREALLOCATED

#define PREALLOCATED   sys_var::ALLOCATED +

◆ READ_ONLY

#define READ_ONLY   sys_var::READONLY +

◆ REVERSE

#define REVERSE (   X)    ~(X)

◆ SESSION_ONLY

#define SESSION_ONLY (   X)
Value:
sizeof(((System_variables *)0)->X)
Definition: set_var.h:109
Definition: system_variables.h:174
#define X(b)
Definition: xcom_base.c:5463

◆ SESSION_VAR

#define SESSION_VAR (   X)
Value:
sizeof(((System_variables *)0)->X)
Definition: set_var.h:108
Definition: system_variables.h:174
#define X(b)
Definition: xcom_base.c:5463

◆ session_var

#define session_var (   THD,
  TYPE 
)    (*(TYPE *)session_var_ptr(THD))

◆ UNTRACKED_DEFAULT

#define UNTRACKED_DEFAULT   sys_var::TRI_LEVEL +

◆ VALID_RANGE

#define VALID_RANGE (   X,
 
)    X, Y

Typedef Documentation

◆ keycache_update_function

typedef bool(* keycache_update_function) (THD *, KEY_CACHE *, ptrdiff_t, ulonglong)

◆ Sys_var_harows

◆ Sys_var_int32

◆ Sys_var_long

◆ Sys_var_uint

◆ Sys_var_ulong

◆ Sys_var_ulonglong

Enumeration Type Documentation

◆ charset_enum

Enumerator
IN_SYSTEM_CHARSET 
IN_FS_CHARSET 

Function Documentation

◆ fixup_enforce_gtid_consistency_command_line()

const char* fixup_enforce_gtid_consistency_command_line ( char *  value_arg)

Variable Documentation

◆ all_sys_vars

sys_var_chain all_sys_vars

◆ bool_values

const char* bool_values[3] = {"OFF", "ON", 0}
static