1#ifndef SYS_VARS_H_INCLUDED
2#define SYS_VARS_H_INCLUDED
61#include "mysqld_error.h"
99template <
typename Struct_type,
typename Name_getter>
101template <
typename T, u
long ARGT, enum enum_mysql_show_type SHOWT,
bool SIGNED>
117#define VALID_RANGE(X, Y) X, Y
119#define BLOCK_SIZE(X) X
120#define GLOBAL_VAR(X) \
121 sys_var::GLOBAL, (((const char *)&(X)) - (char *)&global_system_variables), \
123#define SESSION_VAR(X) \
124 sys_var::SESSION, offsetof(System_variables, X), \
125 sizeof(((System_variables *)nullptr)->X)
126#define SESSION_ONLY(X) \
127 sys_var::ONLY_SESSION, offsetof(System_variables, X), \
128 sizeof(((System_variables *)nullptr)->X)
129#define NO_CMD_LINE CMD_LINE(NO_ARG, -1)
134#define NO_MUTEX_GUARD ((PolyLock *)nullptr)
135#define IN_BINLOG sys_var::SESSION_VARIABLE_IN_BINLOG
136#define NOT_IN_BINLOG sys_var::VARIABLE_NOT_IN_BINLOG
139#define PRE_UPDATE(X) X
140#define ON_UPDATE(X) X
141#define READ_ONLY sys_var::READONLY +
142#define NOT_VISIBLE sys_var::INVISIBLE +
143#define UNTRACKED_DEFAULT sys_var::TRI_LEVEL +
144#define HINT_UPDATEABLE sys_var::HINT_UPDATEABLE +
146#define PREALLOCATED sys_var::ALLOCATED +
147#define NON_PERSIST sys_var::NOTPERSIST +
148#define PERSIST_AS_READONLY sys_var::PERSIST_AS_READ_ONLY +
149#define SENSITIVE sys_var::SENSITIVE +
155#define REVERSE(X) ~(X)
156#define DEPRECATED_VAR(X) X
158#define session_var(THD, TYPE) (*(TYPE *)session_var_ptr(THD))
159#define global_var(TYPE) (*(TYPE *)global_var_ptr())
161#define GET_HA_ROWS GET_ULL
197template <
typename T, u
long ARGT, enum enum_mysql_show_type SHOWT,
bool SIGNED>
201 const char *name_arg,
const char *
comment,
int flag_args,
202 ptrdiff_t off,
size_t size [[maybe_unused]],
CMD_LINE getopt,
203 T min_val, T max_val, T def_val, uint block_size,
208 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
211 binlog_status_arg, on_check_func, on_update_func,
212 substitute, parse_flag) {
214 if ((min_val % block_size) != 0)
215 min_val += block_size - (min_val % block_size);
225 assert(
size ==
sizeof(T));
226 assert(min_val <= def_val);
227 assert(def_val <= max_val);
228 assert(block_size > 0);
230 assert(def_val % block_size == 0);
381 const char *deprecation_substitute_arg,
382 sys_var *persisted_alias,
bool is_persisted_deprecated)
389 persisted_alias, is_persisted_deprecated),
466 std::string_view keycache_name)
override {
470 std::string_view keycache_name)
override {
560 m_comment = std::string(
"This option is deprecated. Use ") +
583 binlog_status_arg, on_check_func, on_update_func, substitute,
598 if (!(res = var->value->val_str(&
str)))
600 else if (!(var->save_result.ulonglong_value =
604 var->save_result.ulonglong_value--;
606 const longlong tmp = var->value->val_int();
610 var->save_result.ulonglong_value = tmp;
637 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
638 size_t size [[maybe_unused]],
CMD_LINE getopt,
const char *values[],
643 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
645 values, def_val,
lock, binlog_status_arg, on_check_func,
646 on_update_func, substitute, parse_flag) {
650 assert(
size ==
sizeof(ulong));
672 std::string_view)
override {
673 return pointer_cast<const uchar *>(
690 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
691 size_t size [[maybe_unused]],
CMD_LINE getopt,
bool def_val,
696 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
699 on_check_func, on_update_func, substitute, parse_flag) {
703 assert(
size ==
sizeof(
bool));
803 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
805 uint value_count_arg, uint def_val, uint command_line_no_value_arg,
810 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
813 on_check_func, on_update_func, substitute, parse_flag),
828 assert(
size ==
sizeof(ulong));
862 if (value_str ==
nullptr) {
869 if (value != -1)
goto end;
872 value = strtol(value_str, &
end, 10);
874 if (
end > value_str && *
end ==
'\0')
892 if (!res)
return true;
898 &valid_len, &len_error))
902 if (value == -1)
return true;
1013 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1015 enum charset_enum is_os_charset_arg,
const char *def_val,
1020 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
1023 binlog_status_arg, on_check_func, on_update_func, substitute,
1028 assert(
size ==
sizeof(
char *));
1033 flags &= ~ALLOCATED;
1090 :
const_cast<char *
>(
"");
1106 enum charset_enum is_os_charset_arg,
const char *def_val)
1108 is_os_charset_arg, def_val) {}
1113 std::string_view keycache_name)
override {
1117 static const char *altered_value =
"some-other-version";
1118 const uchar *altered_value_ptr = pointer_cast<uchar *>(&altered_value);
1119 value = altered_value_ptr;
1158 std::string_view)
override {
1160 return proxy_user[0] ? pointer_cast<const uchar *>(proxy_user) :
nullptr;
1172 std::string_view)
override {
1175 return external_user.
length ? pointer_cast<const uchar *>(external_user.
str)
1195 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1197 enum charset_enum is_os_charset_arg,
const char *def_val,
1202 const char *substitute =
nullptr)
1204 getopt, is_os_charset_arg, def_val,
lock,
1205 binlog_status_arg, on_check_func, on_update_func,
1233 const char *name_arg,
const char *
comment,
int flag_args,
CMD_LINE getopt,
1238 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
1241 binlog_status_arg, on_check_func, on_update_func, substitute,
1279 std::string_view)
override {
1295#define KEYCACHE_VAR(X) \
1296 sys_var::GLOBAL, offsetof(KEY_CACHE, X), sizeof(((KEY_CACHE *)nullptr)->X)
1297#define keycache_var_ptr(KC, OFF) (((uchar *)(KC)) + (OFF))
1298#define keycache_var(KC, OFF) (*(ulonglong *)keycache_var_ptr(KC, OFF))
1324 const char *substitute =
nullptr)
1326 name_arg,
comment, flag_args, -1,
1327 size, getopt, min_val, max_val, def_val, block_size,
lock,
1328 binlog_status_arg, on_check_func,
nullptr, substitute),
1347 "is deprecated and will be removed in a "
1365 if (key_cache->
in_init)
return true;
1370 std::string_view keycache_name)
override {
1371 if (!keycache_name.empty())
1373 ER_WARN_DEPRECATED_SYNTAX,
1374 "@@global.%.*s.%s syntax "
1375 "is deprecated and will be removed in a "
1377 static_cast<int>(keycache_name.size()),
1378 keycache_name.data(),
name.
str);
1396 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1397 size_t size [[maybe_unused]],
CMD_LINE getopt,
double min_val,
1398 double max_val,
double def_val,
PolyLock *
lock =
nullptr,
1402 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
1406 binlog_status_arg, on_check_func, on_update_func, substitute,
1412 assert(min_val <= max_val);
1413 assert(min_val <= def_val);
1414 assert(max_val >= def_val);
1415 assert(
size ==
sizeof(
double));
1488 const char *name_arg,
const char *
comment,
int, ptrdiff_t off,
1489 size_t size,
CMD_LINE getopt, uint min_val, uint max_val, uint def_val,
1494 const char *substitute =
nullptr)
1496 max_val, def_val, block_size,
lock, binlog_status_arg,
1497 on_check_func, on_update_func, substitute) {}
1499 std::string_view keycache_name)
override {
1508#define MAX_SET(X) ((((1ULL << ((X)-1)) - 1) << 1) | 1)
1527 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1528 size_t size [[maybe_unused]],
CMD_LINE getopt,
const char *values[],
1533 const char *substitute =
nullptr)
1535 values, def_val,
lock, binlog_status_arg, on_check_func,
1536 on_update_func, substitute) {
1542 assert(strcmp(values[
typelib.
count - 1],
"default") == 0);
1566 static_cast<uint
>(res->
length()), &
error, &error_len);
1575 if ((tmp < 0 && !var->value->unsigned_flag) ||
1604 std::string_view)
override {
1627 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1628 size_t size [[maybe_unused]],
CMD_LINE getopt,
const char *values[],
1633 const char *substitute =
nullptr)
1635 values, def_val,
lock, binlog_status_arg, on_check_func,
1636 on_update_func, substitute) {
1658 nullptr, &
error, &error_len, ¬_used);
1672 if ((tmp < 0 && !var->value->unsigned_flag) ||
1701 std::string_view)
override {
1730 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1731 size_t size [[maybe_unused]],
CMD_LINE getopt,
int plugin_type_arg,
1736 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
1739 binlog_status_arg, on_check_func, on_update_func, substitute,
1744 assert(getopt.
id == -1);
1776 if (oldval != newval) {
1796 pname.
str = *default_value;
1817 std::string_view)
override {
1831#if defined(ENABLED_DEBUG_SYNC)
1835class Sys_var_debug_sync :
public sys_var {
1838 const char *name_arg,
const char *
comment,
int flag_args,
CMD_LINE getopt,
1840 enum binlog_status_enum binlog_status_arg = VARIABLE_NOT_IN_BINLOG,
1841 on_check_function on_check_func =
nullptr,
1842 on_update_function on_update_func =
nullptr,
1843 const char *substitute =
nullptr,
int parse_flag = PARSE_NORMAL)
1846 binlog_status_arg, on_check_func, on_update_func, substitute,
1848 assert(
scope() == ONLY_SESSION);
1878 std::string_view)
override {
1879 return debug_sync_value_ptr(running_thd);
1922 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1929 const char *substitute =
nullptr)
1932 on_check_func, on_update_func, substitute) {
1938 assert(getopt.
id == -1);
1959 std::string_view)
override {
2002 const char *substitute =
nullptr)
2004 getopt, min_val, max_val, 0, block_size,
lock,
2005 binlog_status_arg, on_check_func,
nullptr,
2010 assert(getopt.
id == -1);
2020 var->
value =
nullptr;
2027 std::string_view)
override {
2049 const char *name_arg,
const char *
comment,
int flag_args,
CMD_LINE getopt,
2055 const char *substitute =
nullptr)
2057 min_val, max_val, 0.0,
lock, binlog_status_arg,
2058 on_check_func,
nullptr, substitute),
2062 assert(getopt.
id == -1);
2072 var->
value =
nullptr;
2079 std::string_view)
override {
2102 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2107 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
2110 on_check_func, on_update_func, substitute, parse_flag) {
2112 assert(getopt.
id == -1);
2113 assert(
lock ==
nullptr);
2139 return pointer_cast<const uchar *>(
2164 const char *substitute =
nullptr)
2197template <
typename Struct_type,
typename Name_getter>
2201 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2202 size_t size [[maybe_unused]],
CMD_LINE getopt,
void *def_val,
2207 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
2210 binlog_status_arg, on_check_func, on_update_func, substitute,
2221 assert(getopt.
id == -1);
2222 assert(
size ==
sizeof(
void *));
2241 const Struct_type *ptr =
2244 strcpy(def_val, pointer_cast<const char *>(Name_getter(ptr).get_name()));
2250 std::string_view)
override {
2251 const Struct_type *ptr =
session_var(target_thd,
const Struct_type *);
2252 return ptr ? Name_getter(ptr).get_name() :
nullptr;
2255 const Struct_type *ptr =
global_var(
const Struct_type *);
2256 return ptr ? Name_getter(ptr).get_name() :
nullptr;
2273 ptrdiff_t off,
size_t size [[maybe_unused]],
CMD_LINE getopt,
2278 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
2281 binlog_status_arg, on_check_func, on_update_func, substitute,
2283 assert(getopt.
id == -1);
2292 if (!res)
return true;
2319 std::string_view)
override {
2329 return pointer_cast<const uchar *>(
2333 return pointer_cast<const uchar *>(
2350 int flag_args, ptrdiff_t off,
size_t size,
2351 CMD_LINE getopt,
const char *values[],
2356 def_val,
lock, binlog_status_arg, on_check_func) {}
2372 int flag_args, ptrdiff_t off,
size_t size,
2377 lock, binlog_status_arg, on_check_func) {}
2388 int flag_args, ptrdiff_t off,
size_t size,
2389 CMD_LINE getopt,
const char *values[],
2394 size, getopt, values, def_val,
lock, binlog_status_arg,
2405 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2406 size_t size [[maybe_unused]],
CMD_LINE getopt,
const char *def_val,
2411 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
2414 binlog_status_arg, on_check_func, on_update_func, substitute,
2440 std::string_view)
override {
2448 return (
uchar *)ret;
2456#ifdef HAVE_GTID_NEXT_LIST
2464class Sys_var_gtid_set :
public sys_var {
2467 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2469 enum binlog_status_enum binlog_status_arg = VARIABLE_NOT_IN_BINLOG,
2470 on_check_function on_check_func = 0,
2471 on_update_function on_update_func = 0,
const char *substitute = 0,
2472 int parse_flag = PARSE_NORMAL)
2475 binlog_status_arg, on_check_func, on_update_func, substitute,
2488 char *ptr = (
char *)(
intptr)option.def_value;
2500 if (res ==
nullptr) {
2504 assert(res->
ptr() !=
nullptr);
2516 const std::string &)
override {
2520 if (gs ==
nullptr)
return nullptr;
2623 time_t current_time = time(
nullptr);
2626 current_time = 1616893190;
2630 current_time = 1616893200;
2634 localtime_r(¤t_time, &tm_tmp);
2646 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2651 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
2654 binlog_status_arg, on_check_func, on_update_func, substitute,
2679 if (!res)
return true;
2733 std::string_view)
override {
2735 char *
buf =
nullptr;
2736 const bool remote = (target_thd != running_thd);
2744#ifdef HAVE_GTID_NEXT_LIST
2746 target_thd->owned_gtid_set.get_string_length() + 1);
2749 target_thd->owned_gtid_set.to_string(
buf);
2786 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2787 size_t size,
CMD_LINE getopt,
const char *values[], uint def_val,
2792 def_val,
lock, binlog_status_arg, on_check_func) {}
2800 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2808 lock, binlog_status_arg, on_check_func) {}
2816 int flag_args, ptrdiff_t off,
size_t size,
2821 size, getopt, def_val,
lock, binlog_status_arg,
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
void rdlock()
Acquire the read lock.
Definition: rpl_gtid.h:486
void wrlock()
Acquire the write lock.
Definition: rpl_gtid.h:495
void unlock()
Release the lock (whether it is a write or read lock).
Definition: rpl_gtid.h:506
Definition: sql_error.h:225
Represents a set of GTIDs.
Definition: rpl_gtid.h:1557
static bool is_valid(const char *text)
Returns true if the given string is a valid specification of a Gtid_set, false otherwise.
Definition: rpl_gtid_set.cc:607
size_t get_string_length(const String_format *string_format=nullptr) const
Returns the length of the output from to_string.
Definition: rpl_gtid_set.cc:942
size_t to_string(char *buf, bool need_lock=false, const String_format *string_format=nullptr) const
Formats this Gtid_set as a string and saves in a given buffer.
Definition: rpl_gtid_set.cc:807
const Gtid_set * get_executed_gtids() const
Definition: rpl_gtid.h:3378
const Gtid_set * get_lost_gtids() const
Return a pointer to the Gtid_set that contains the lost gtids.
Definition: rpl_gtid.h:3373
const Owned_gtids * get_owned_gtids() const
Return a pointer to the Owned_gtids that contains the owned gtids.
Definition: rpl_gtid.h:3394
int32 get_anonymous_ownership_count()
Return the number of clients that hold anonymous ownership.
Definition: rpl_gtid.h:3038
virtual double val_real()=0
virtual longlong val_int()=0
virtual Item_result result_type() const
Definition: item.h:1451
bool unsigned_flag
Definition: item.h:3713
virtual String * val_str(String *str)=0
Represents the set of GTIDs that are owned by some thread.
Definition: rpl_gtid.h:2587
size_t get_max_string_length() const
Return an upper bound on the length of the string representation of this Owned_gtids.
Definition: rpl_gtid.h:2683
int to_string(char *out) const
Write a string representation of this Owned_gtids to the given buffer.
Definition: rpl_gtid.h:2657
wrapper to hide a mutex and an rwlock under a common interface
Definition: sys_vars_shared.h:52
char * mem_strdup(const char *str)
Definition: sql_class.h:437
LEX_CSTRING external_user() const
Getter method for member m_external_user.
Definition: sql_security_ctx.h:454
LEX_CSTRING proxy_user() const
Getter method for member m_proxy_user.
Definition: sql_security_ctx.cc:1093
bool update(char **var, char *val, size_t val_len)
Frees the old allocated memory, memdup()'s the given val to a new memory address & updates the sessio...
Definition: sys_vars_resource_mgr.cc:73
@ SL_WARNING
Definition: sql_error.h:63
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
LEX_CSTRING lex_cstring() const
Definition: sql_string.h:297
const CHARSET_INFO * charset() const
Definition: sql_string.h:240
static bool needs_conversion(size_t arg_length, const CHARSET_INFO *cs_from, const CHARSET_INFO *cs_to, size_t *offset)
Checks that the source string can be just copied to the destination string without conversion.
Definition: sql_string.h:650
const char * ptr() const
Definition: sql_string.h:249
size_t length() const
Definition: sql_string.h:241
A sys_var that is an alias for another sys_var.
Definition: sys_vars.h:354
bool set_user(const char *usr) override
Definition: sys_vars.h:436
Sys_var_alias(const char *name_arg, sys_var &base_var, const char *deprecation_substitute_arg, sys_var *persisted_alias, bool is_persisted_deprecated)
Special constructor used to implement Sys_var_deprecated alias.
Definition: sys_vars.h:380
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.h:460
const char * get_host() override
Definition: sys_vars.h:438
ulonglong get_max_value() override
Definition: sys_vars.h:411
sys_var & m_base_var
Definition: sys_vars.h:356
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:457
bool is_non_persistent() override
Definition: sys_vars.h:419
void set_timestamp(ulonglong ts) override
Definition: sys_vars.h:445
const uchar * session_value_ptr(THD *running_thd, THD *target_thd, std::string_view keycache_name) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:465
void cleanup() override
All the cleanup procedures should be performed here.
Definition: sys_vars.h:402
Sys_var_alias(const char *name_arg, sys_var &base_var)
Definition: sys_vars.h:396
ulonglong get_timestamp() const override
Definition: sys_vars.h:440
void set_source(enum_variable_source src) override
Definition: sys_vars.h:430
void update_default(longlong new_def_value) override
Definition: sys_vars.h:406
longlong get_default() override
Definition: sys_vars.h:409
void session_save_default(THD *thd, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:451
void set_timestamp() override
Definition: sys_vars.h:444
sys_var & get_base_var()
Definition: sys_vars.h:400
void set_user_host(THD *thd) override
Definition: sys_vars.h:443
const char * get_user() override
Definition: sys_vars.h:437
bool set_source_name(const char *path) override
Definition: sys_vars.h:433
void set_arg_source(get_opt_arg_source *arg_source) override
Definition: sys_vars.h:413
const uchar * global_value_ptr(THD *thd, std::string_view keycache_name) override
Definition: sys_vars.h:469
void set_is_plugin(bool is_plugin) override
Definition: sys_vars.h:416
bool check_update_type(Item_result type) override
Definition: sys_vars.h:423
void global_save_default(THD *thd, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:454
const char * get_source_name() override
Definition: sys_vars.h:427
ulong get_var_type() override
Returns variable type.
Definition: sys_vars.h:412
void saved_value_to_string(THD *thd, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:420
enum_variable_source get_source() override
Definition: sys_vars.h:426
sys_var_pluginvar * cast_pluginvar() override
downcast for sys_var_pluginvar.
Definition: sys_vars.h:403
longlong get_min_value() override
Definition: sys_vars.h:410
bool set_host(const char *hst) override
Definition: sys_vars.h:439
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:448
Definition: sys_vars.h:2813
Sys_var_binlog_encryption(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, bool def_val, PolyLock *lock, enum binlog_status_enum binlog_status_arg, on_check_function on_check_func)
Definition: sys_vars.h:2815
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.cc:7137
The class for bit variables - a variant of boolean that stores the value in a bit.
Definition: sys_vars.h:1910
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, bool def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, pre_update_function pre_update_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr)
Definition: sys_vars.h:1921
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1952
void saved_value_to_string(THD *, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:1955
const uchar * session_value_ptr(THD *running_thd, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:1958
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:1949
void set(uchar *ptr, ulonglong value)
Definition: sys_vars.h:1913
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1941
ulonglong bitmask
Definition: sys_vars.h:1911
bool reverse_semantics
Definition: sys_vars.h:1912
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:1965
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:1945
The class for boolean variables - a variant of ENUM variables with the fixed list of values of { OFF ...
Definition: sys_vars.h:687
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:710
Sys_var_bool(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, bool def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Definition: sys_vars.h:689
void session_save_default(THD *thd, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:714
void saved_value_to_string(THD *, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:721
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:718
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:705
Abstract base class for read-only variables (global or session) of string type where the value is gen...
Definition: sys_vars.h:2545
bool session_update(THD *, set_var *) override
Definition: sys_vars.h:2558
Sys_var_charptr_func(const char *name_arg, const char *comment, flag_enum flag_arg)
Definition: sys_vars.h:2547
const uchar * session_value_ptr(THD *, THD *, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:2579
bool check_update_type(Item_result) override
Definition: sys_vars.h:2575
bool do_check(THD *, set_var *) override
Definition: sys_vars.h:2571
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2568
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:2562
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2583
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:2567
void session_save_default(THD *, set_var *) override
save the session default value of the variable in var
Definition: sys_vars.h:2566
The class for string variables.
Definition: sys_vars.h:1010
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:1036
bool check_update_type(Item_result type) override
Definition: sys_vars.h:1097
void cleanup() override
All the cleanup procedures should be performed here.
Definition: sys_vars.h:1031
void saved_value_to_string(THD *, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:1093
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1077
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:1071
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1060
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.cc:4066
Sys_var_charptr(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, enum charset_enum is_os_charset_arg, const char *def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Definition: sys_vars.h:1012
@session.dbug and @global.dbug variables.
Definition: sys_vars.h:1230
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:1245
void session_save_default(THD *, set_var *) override
save the session default value of the variable in var
Definition: sys_vars.h:1269
const uchar * session_value_ptr(THD *running_thd, THD *, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:1278
bool check_update_type(Item_result type) override
Definition: sys_vars.h:1289
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:1284
bool session_update(THD *, set_var *var) override
Definition: sys_vars.h:1256
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:1264
Sys_var_dbug(const char *name_arg, const char *comment, int flag_args, CMD_LINE getopt, const char *def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Definition: sys_vars.h:1232
void saved_value_to_string(THD *, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:1274
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1270
A deprecated alias for a variable.
Definition: sys_vars.h:553
std::string m_comment
Definition: sys_vars.h:555
Sys_var_deprecated_alias(const char *name_arg, sys_var &base_var)
Definition: sys_vars.h:558
The class for floating point variables.
Definition: sys_vars.h:1393
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:1429
void saved_value_to_string(THD *, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:1442
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1425
Sys_var_double(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, double min_val, double max_val, double def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Definition: sys_vars.h:1395
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1439
bool check_update_type(Item_result type) override
Definition: sys_vars.h:1433
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:1417
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:1436
Definition: sys_vars.h:2797
Sys_var_enforce_gtid_consistency(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, const ALIAS aliases[], const uint value_count, uint def_val, uint command_line_no_value, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr)
Definition: sys_vars.h:2799
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.cc:4534
A class for @global.binlog_checksum that has a specialized update method.
Definition: sys_vars.h:2385
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.cc:4082
Sys_var_enum_binlog_checksum(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, const char *values[], uint def_val, PolyLock *lock, enum binlog_status_enum binlog_status_arg, on_check_function on_check_func=nullptr)
Definition: sys_vars.h:2387
The class for ENUM variables - variables that take one value from a fixed list of values.
Definition: sys_vars.h:634
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:661
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:657
void saved_value_to_string(THD *, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:667
Sys_var_enum(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, const char *values[], uint def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Definition: sys_vars.h:636
const uchar * session_value_ptr(THD *, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:671
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:664
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:676
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:652
Definition: sys_vars.h:1164
const uchar * session_value_ptr(THD *, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:1171
Sys_var_external_user(const char *name_arg, const char *comment_arg, enum charset_enum is_os_charset_arg)
Definition: sys_vars.h:1166
The class for flagset variables - a variant of SET that allows in-place editing (turning on/off indiv...
Definition: sys_vars.h:1524
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:1588
const uchar * session_value_ptr(THD *running_thd, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:1603
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1584
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:1609
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1595
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:1545
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:1592
Sys_var_flagset(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, const char *values[], ulonglong def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr)
Definition: sys_vars.h:1526
void saved_value_to_string(THD *thd, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:1598
Class for @global.gtid_executed.
Definition: sys_vars.h:2592
Sys_var_gtid_executed(const char *name_arg, const char *comment_arg)
Definition: sys_vars.h:2594
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:2597
Definition: sys_vars.h:2783
Sys_var_gtid_mode(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, const char *values[], uint def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr)
Definition: sys_vars.h:2785
bool global_update(THD *thd, set_var *var) override
This function shall be called whenever the global scope of gtid_mode var is updated.
Definition: sys_vars.cc:4222
Class for gtid_next.
Definition: sys_vars.h:2402
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:2431
const uchar * session_value_ptr(THD *running_thd, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:2439
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.cc:4116
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2450
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2432
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:2420
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:2424
bool do_check(THD *, set_var *) override
Definition: sys_vars.h:2435
bool check_update_type(Item_result type) override
Definition: sys_vars.h:2436
Sys_var_gtid_next(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, const char *def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Definition: sys_vars.h:2404
Definition: sys_vars.h:2726
Sys_var_gtid_owned(const char *name_arg, const char *comment_arg)
Definition: sys_vars.h:2728
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:2769
const uchar * session_value_ptr(THD *running_thd, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:2732
Class for @session.gtid_purged.
Definition: sys_vars.h:2643
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.cc:6491
const uchar * session_value_ptr(THD *, THD *, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:2720
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:2666
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:2674
bool check_update_type(Item_result type) override
Definition: sys_vars.h:2692
bool session_update(THD *, set_var *) override
Definition: sys_vars.h:2657
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:2696
Sys_var_gtid_purged(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t, CMD_LINE getopt, const char *def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Definition: sys_vars.h:2645
void session_save_default(THD *, set_var *) override
save the session default value of the variable in var
Definition: sys_vars.h:2662
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2670
A subclass of Sys_var_have to return dynamic values.
Definition: sys_vars.h:2152
static enum SHOW_COMP_OPTION dummy_
Definition: sys_vars.h:2181
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:2175
enum SHOW_COMP_OPTION(* func_)(THD *)
Definition: sys_vars.h:2180
Sys_var_have_func(const char *name_arg, const char *comment, enum SHOW_COMP_OPTION(*func)(THD *), const char *substitute=nullptr)
Construct a new variable.
Definition: sys_vars.h:2162
The class for read-only variables that show whether a particular feature is supported by the server.
Definition: sys_vars.h:2099
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:2127
Sys_var_have(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Definition: sys_vars.h:2101
void session_save_default(THD *, set_var *) override
save the session default value of the variable in var
Definition: sys_vars.h:2131
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2138
bool check_update_type(Item_result) override
Definition: sys_vars.h:2142
bool do_check(THD *, set_var *) override
Definition: sys_vars.h:2119
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:2132
const uchar * session_value_ptr(THD *, THD *, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:2134
bool session_update(THD *, set_var *) override
Definition: sys_vars.h:2123
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2133
Sys_var_integer template is used to generate Sys_var_* classes for variables that represent the value...
Definition: sys_vars.h:198
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:316
Sys_var_integer(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, T min_val, T max_val, T def_val, uint block_size, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Definition: sys_vars.h:200
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:233
T * max_var_ptr()
Definition: sys_vars.h:329
void session_save_default(THD *thd, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:312
bool check_update_type(Item_result type) override
Definition: sys_vars.h:309
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:301
void saved_value_to_string(THD *, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:319
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:305
The class for keycache_* variables.
Definition: sys_vars.h:1313
const uchar * global_value_ptr(THD *thd, std::string_view keycache_name) override
Definition: sys_vars.h:1369
Sys_var_keycache(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, ulonglong min_val, ulonglong max_val, ulonglong def_val, uint block_size, PolyLock *lock, enum binlog_status_enum binlog_status_arg, on_check_function on_check_func, keycache_update_function on_update_func, const char *substitute=nullptr)
Definition: sys_vars.h:1317
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1336
keycache_update_function keycache_update
Definition: sys_vars.h:1314
The class for string variables.
Definition: sys_vars.h:1192
Sys_var_lexstring(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, enum charset_enum is_os_charset_arg, const char *def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr)
Definition: sys_vars.h:1194
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1211
The class for the max_user_connections.
Definition: sys_vars.h:1485
Sys_var_max_user_conn(const char *name_arg, const char *comment, int, ptrdiff_t off, size_t size, CMD_LINE getopt, uint min_val, uint max_val, uint def_val, uint block_size, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr)
Definition: sys_vars.h:1487
const uchar * session_value_ptr(THD *running_thd, THD *target_thd, std::string_view keycache_name) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:1498
A variant of enum where:
Definition: sys_vars.h:750
uint command_line_no_value
Definition: sys_vars.h:995
const char * command_line_value
Pointer to the value set by the command line (set by the command line parser, copied to the global va...
Definition: sys_vars.h:994
const uint value_count
The number of allowed numeric values.
Definition: sys_vars.h:984
uint alias_count
The number of elements of aliases (computed in the constructor).
Definition: sys_vars.h:988
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:955
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:929
const ALIAS * aliases
Array of all textual aliases.
Definition: sys_vars.h:986
bool check_update_type(Item_result type) override
Definition: sys_vars.h:914
const uchar * session_value_ptr(THD *, THD *, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:966
bool session_update(THD *, set_var *) override
Definition: sys_vars.h:917
void session_save_default(THD *, set_var *) override
save the session default value of the variable in var
Definition: sys_vars.h:942
int find_value(const char *text)
Return the numeric value for a given alias string, or -1 if the string is not a valid alias.
Definition: sys_vars.h:835
bool do_check(THD *, set_var *var) override
Definition: sys_vars.h:886
Sys_var_multi_enum(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, const ALIAS aliases_arg[], uint value_count_arg, uint def_val, uint command_line_no_value_arg, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Enumerated type system variable.
Definition: sys_vars.h:802
void saved_value_to_string(THD *, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:962
const char * fixup_command_line(const char *value_str)
Because of limitations in the command-line parsing library, the value given on the command-line canno...
Definition: sys_vars.h:856
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:977
The class for variables which value is a plugin.
Definition: sys_vars.h:1725
bool check_update_type(Item_result type) override
Definition: sys_vars.h:1813
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:1746
void session_save_default(THD *thd, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:1789
void saved_value_to_string(THD *, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:1809
void global_save_default(THD *thd, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1793
const uchar * session_value_ptr(THD *running_thd, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:1816
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1781
Sys_var_plugin(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, int plugin_type_arg, const char **def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Definition: sys_vars.h:1729
void do_update(plugin_ref *valptr, plugin_ref newval)
Definition: sys_vars.h:1774
int plugin_type
Definition: sys_vars.h:1726
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:1785
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:1823
Definition: sys_vars.h:1126
void session_save_default(THD *, set_var *) override
save the session default value of the variable in var
Definition: sys_vars.h:1149
const uchar * session_value_ptr(THD *, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:1157
bool check_update_type(Item_result) override
Definition: sys_vars.h:1154
bool session_update(THD *, set_var *) override
Definition: sys_vars.h:1141
bool do_check(THD *, set_var *) override
Definition: sys_vars.h:1137
Sys_var_proxy_user(const char *name_arg, const char *comment, enum charset_enum is_os_charset_arg)
Definition: sys_vars.h:1128
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:1145
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:1150
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:1151
Similar to Sys_var_session_special, but with double storage.
Definition: sys_vars.h:2040
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:2074
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:2071
session_special_read_double_function read_func
Definition: sys_vars.h:2044
double(* session_special_read_double_function)(THD *thd)
Definition: sys_vars.h:2042
session_special_update_function update_func
Definition: sys_vars.h:2045
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2075
Sys_var_session_special_double(const char *name_arg, const char *comment, int flag_args, CMD_LINE getopt, double min_val, double max_val, uint, PolyLock *lock, enum binlog_status_enum binlog_status_arg, on_check_function on_check_func, session_special_update_function update_func_arg, session_special_read_double_function read_func_arg, const char *substitute=nullptr)
Definition: sys_vars.h:2048
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:2067
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:2064
const uchar * session_value_ptr(THD *running_thd, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:2078
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2083
bool(* session_special_update_function)(THD *thd, set_var *var)
Definition: sys_vars.h:2041
The class for variables that have a special meaning for a session, such as @timestamp or @rnd_seed1,...
Definition: sys_vars.h:1987
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:2015
bool(* session_special_update_function)(THD *thd, set_var *var)
Definition: sys_vars.h:1988
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:2012
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:2019
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2031
Sys_var_session_special(const char *name_arg, const char *comment, int flag_args, CMD_LINE getopt, ulonglong min_val, ulonglong max_val, uint block_size, PolyLock *lock, enum binlog_status_enum binlog_status_arg, on_check_function on_check_func, session_special_update_function update_func_arg, session_special_read_function read_func_arg, const char *substitute=nullptr)
Definition: sys_vars.h:1995
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:2022
ulonglong(* session_special_read_function)(THD *thd)
Definition: sys_vars.h:1989
session_special_read_function read_func
Definition: sys_vars.h:1991
session_special_update_function update_func
Definition: sys_vars.h:1992
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2023
const uchar * session_value_ptr(THD *running_thd, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:2026
The class for SET variables - variables taking zero or more values from the given list.
Definition: sys_vars.h:1624
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1681
bool do_check(THD *, set_var *var) override
Definition: sys_vars.h:1644
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:1706
Sys_var_set(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, const char *values[], ulonglong def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr)
Definition: sys_vars.h:1626
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:1689
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1692
void saved_value_to_string(THD *thd, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:1695
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:1685
const uchar * session_value_ptr(THD *running_thd, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:1700
Generic class for variables for storing entities that are internally represented as structures,...
Definition: sys_vars.h:2198
bool check_update_type(Item_result type) override
Definition: sys_vars.h:2246
void saved_value_to_string(THD *, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2240
const uchar * session_value_ptr(THD *, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:2249
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:2225
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:2236
Sys_var_struct(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, void *def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Definition: sys_vars.h:2200
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:2229
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2254
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:2233
bool do_check(THD *, set_var *) override
Definition: sys_vars.h:2224
Class for @global.system_time_zone.
Definition: sys_vars.h:2614
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2621
Sys_var_system_time_zone(const char *name_arg, const char *comment_arg)
Definition: sys_vars.h:2616
The class for test_flags (core_file for now).
Definition: sys_vars.h:1457
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:1469
bool test_flag_value
Definition: sys_vars.h:1459
uint test_flag_mask
Definition: sys_vars.h:1460
Sys_var_test_flag(const char *name_arg, const char *comment, uint mask)
Definition: sys_vars.h:1463
Class representing the 'transaction_isolation' system variable.
Definition: sys_vars.h:2347
bool session_update(THD *thd, set_var *var) override
This function sets the session variable thd->variables.transaction_isolation to reflect changes to @s...
Definition: sys_vars.cc:4991
Sys_var_transaction_isolation(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, const char *values[], uint def_val, PolyLock *lock, enum binlog_status_enum binlog_status_arg, on_check_function on_check_func)
Definition: sys_vars.h:2349
Class representing the tx_read_only system variable for setting default transaction access mode.
Definition: sys_vars.h:2369
bool session_update(THD *thd, set_var *var) override
This function sets the session variable thd->variables.transaction_read_only to reflect changes to @s...
Definition: sys_vars.cc:5060
Sys_var_transaction_read_only(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, bool def_val, PolyLock *lock, enum binlog_status_enum binlog_status_arg, on_check_function on_check_func)
Definition: sys_vars.h:2371
Helper class for variables that take values from a TYPELIB.
Definition: sys_vars.h:569
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)
Definition: sys_vars.h:574
bool do_check(THD *, set_var *var) override
Definition: sys_vars.h:592
TYPELIB typelib
Definition: sys_vars.h:571
bool check_update_type(Item_result type) override
Definition: sys_vars.h:615
The class for variables that store time zones.
Definition: sys_vars.h:2270
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:2287
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:2301
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:2312
Sys_var_tz(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, Time_zone **def_val, PolyLock *lock=nullptr, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=nullptr, on_update_function on_update_func=nullptr, const char *substitute=nullptr, int parse_flag=PARSE_NORMAL)
Definition: sys_vars.h:2272
bool check_update_type(Item_result type) override
Definition: sys_vars.h:2336
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:2305
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:2309
const uchar * session_value_ptr(THD *, THD *target_thd, std::string_view) override
A pointer to a value of the variable for SHOW.
Definition: sys_vars.h:2318
void saved_value_to_string(THD *, set_var *var, char *def_val) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2315
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2332
Definition: sys_vars.h:1102
~Sys_var_version() override=default
const uchar * global_value_ptr(THD *thd, std::string_view keycache_name) override
Definition: sys_vars.h:1112
Sys_var_version(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, enum charset_enum is_os_charset_arg, const char *def_val)
Definition: sys_vars.h:1104
std::string_view get_keycache_name() const
Definition: set_var.h:684
bool is_keycache_var() const
Definition: set_var.h:661
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Gtid owned_gtid
The GTID of the currently owned transaction.
Definition: sql_class.h:3795
static const int OWNED_SIDNO_GTID_SET
Definition: sql_class.h:3796
double double_value
Definition: sql_class.h:2840
static const int OWNED_SIDNO_ANONYMOUS
Definition: sql_class.h:3797
Session_sysvar_resource_manager session_sysvar_res_mgr
Definition: sql_class.h:4477
void * alloc(size_t size)
Definition: sql_lexer_thd.h:50
bool bool_value
Definition: sql_class.h:2836
System_variables variables
Definition: sql_lexer_thd.h:64
mysql::gtid::Tsid owned_tsid
For convenience, this contains the TSID component of the GTID stored in owned_gtid.
Definition: sql_class.h:3803
char * strmake(const char *str, size_t size) const
Definition: sql_lexer_thd.h:52
union THD::@177 sys_var_tmp
Security_context * security_context() const
Definition: sql_class.h:1329
bool time_zone_used
Definition: sql_class.h:2802
ulonglong ulonglong_value
Definition: sql_class.h:2839
const USER_CONN * get_user_connect() const
Definition: sql_class.h:2450
This class represents abstract time zone and provides basic interface for MYSQL_TIME <-> my_time_t co...
Definition: tztime.h:49
virtual const String * get_name() const =0
Because of constness of String returned by get_name() time zone name have to be already zeroended to ...
set_var_base descendant for assignments to the system variables.
Definition: set_var.h:983
ulonglong ulonglong_value
for all integer, set, enum sysvars
Definition: set_var.h:989
const enum_var_type type
Definition: set_var.h:986
const System_variable_tracker m_var_tracker
Definition: set_var.h:998
union set_var::@172 save_result
Resolver of the variable at the left hand side of the assignment.
Time_zone * time_zone
for Sys_var_tz
Definition: set_var.h:992
Item * value
the expression that provides the new value of the variable
Definition: set_var.h:985
LEX_STRING string_value
for Sys_var_charptr and others
Definition: set_var.h:993
plugin_ref plugin
for Sys_var_plugin
Definition: set_var.h:991
const void * ptr
for Sys_var_struct
Definition: set_var.h:994
double double_value
for Sys_var_double
Definition: set_var.h:990
Definition: sql_plugin_var.h:219
A class representing one system variable - that is something that can be accessed as @global....
Definition: set_var.h:107
virtual bool global_update(THD *thd, set_var *var)=0
virtual bool set_source_name(const char *path)
Definition: set_var.h:243
my_option option
min, max, default values are stored here
Definition: set_var.h:178
my_option * get_option()
Definition: set_var.h:257
bool(* on_update_function)(sys_var *self, THD *thd, enum_var_type type)
Definition: set_var.h:172
virtual void session_save_default(THD *thd, set_var *var)=0
save the session default value of the variable in var
LEX_CSTRING name
Definition: set_var.h:110
virtual void set_arg_source(get_opt_arg_source *)
Definition: set_var.h:236
virtual const char * get_host()
Definition: set_var.h:251
virtual ulonglong get_max_value()
Definition: set_var.h:229
virtual void set_user_host(THD *thd)
Definition: set_var.cc:458
uchar * global_var_ptr()
Definition: set_var.cc:405
enum sys_var::binlog_status_enum binlog_status
Global system variable attributes.
uchar * session_var_ptr(THD *thd)
A pointer to a storage area of the variable, to the raw data.
Definition: set_var.cc:401
flag_enum
Definition: set_var.h:128
@ SESSION
Definition: set_var.h:130
@ GLOBAL
Definition: set_var.h:129
@ READONLY
Definition: set_var.h:133
@ ALLOCATED
Definition: set_var.h:134
@ NOTPERSIST
Definition: set_var.h:137
@ PERSIST_AS_READ_ONLY
There can be some variables which needs to be set before plugin is loaded.
Definition: set_var.h:148
@ ONLY_SESSION
Definition: set_var.h:131
virtual bool do_check(THD *thd, set_var *var)=0
virtual bool check_update_type(Item_result type)=0
virtual const char * get_user()
Definition: set_var.h:250
virtual void cleanup()
All the cleanup procedures should be performed here.
Definition: set_var.h:212
virtual longlong get_min_value()
Definition: set_var.h:228
virtual void set_is_plugin(bool)
Definition: set_var.h:237
binlog_status_enum
Enumeration type to indicate for a system variable whether it will be written to the binlog or not.
Definition: set_var.h:161
@ VARIABLE_NOT_IN_BINLOG
Definition: set_var.h:162
virtual void saved_value_to_string(THD *thd, set_var *var, char *def_val)=0
This function converts value stored in save_result to string.
bool is_os_charset
true if the value is in character_set_filesystem
Definition: set_var.h:189
ptrdiff_t offset
offset to the value from global_system_variables
Definition: set_var.h:180
virtual bool set_user(const char *usr)
Definition: set_var.h:247
bool(* on_check_function)(sys_var *self, THD *thd, set_var *var)
Definition: set_var.h:170
virtual enum_variable_source get_source()
Definition: set_var.h:238
virtual void global_save_default(THD *thd, set_var *var)=0
save the global default value of the variable in var
virtual const uchar * global_value_ptr(THD *thd, std::string_view keycache_name)
Definition: set_var.cc:397
on_check_function on_check
Definition: set_var.h:181
const CHARSET_INFO * charset(THD *thd)
Definition: set_var.cc:593
virtual ulong get_var_type()
Returns variable type.
Definition: set_var.h:235
virtual const char * get_source_name()
Definition: set_var.h:239
pre_update_function pre_update
Pointer to function to be invoked before updating system variable (but after calling on_check hook),...
Definition: set_var.h:186
int scope() const
Definition: set_var.h:278
virtual void set_timestamp()
Definition: set_var.h:258
const SHOW_TYPE show_val_type
what value_ptr() returns for sql_show.cc
Definition: set_var.h:177
on_update_function on_update
Definition: set_var.h:187
int flags
or'ed flag_enum values
Definition: set_var.h:175
static const int PARSE_NORMAL
Definition: set_var.h:156
virtual const uchar * session_value_ptr(THD *running_thd, THD *target_thd, std::string_view keycache_name)
A pointer to a value of the variable for SHOW.
Definition: set_var.cc:392
virtual void update_default(longlong new_def_value)
Definition: set_var.h:224
virtual bool set_host(const char *hst)
Definition: set_var.h:252
PolyLock * guard
second lock that protects the variable
Definition: set_var.h:179
virtual longlong get_default()
Definition: set_var.h:227
virtual bool is_non_persistent()
Definition: set_var.h:260
virtual sys_var_pluginvar * cast_pluginvar()
downcast for sys_var_pluginvar.
Definition: set_var.h:217
const char *const deprecation_substitute
Definition: set_var.h:188
virtual ulonglong get_timestamp() const
Definition: set_var.h:255
bool(* pre_update_function)(sys_var *self, THD *thd, set_var *var)
Definition: set_var.h:171
bool is_readonly() const
Definition: set_var.h:280
virtual bool session_update(THD *thd, set_var *var)=0
int m_parse_flag
either PARSE_EARLY or PARSE_NORMAL.
Definition: set_var.h:176
virtual void set_source(enum_variable_source src)
Definition: set_var.h:240
static char buf[MAX_BUF]
Definition: conf_to_src.cc:73
MYSQL_STRINGS_EXPORT size_t my_fcvt(double x, int precision, char *to, bool *error)
Converts a given floating point number to a zero-terminated string representation using the 'f' forma...
Definition: dtoa.cc:202
#define MAX_TIME_ZONE_NAME_LENGTH
Maximum length of time zone name that we support (Time zone name is char(64) in db).
Definition: binlog_event.h:122
void my_error(int nr, myf MyFlags,...)
Fill in and print a previously registered error message.
Definition: my_error.cc:216
ALWAYS_INLINE const char * base_name(const char *A)
Definition: my_sys.h:709
#define MYSQL_STORAGE_ENGINE_PLUGIN
Definition: plugin.h:114
MYSQL_STRINGS_EXPORT char * longlong10_to_str(int64_t val, char *dst, int radix)
Converts a 64-bit integer to its string representation in decimal notation.
Definition: int2str.cc:98
Key cache variable structures.
KEY_CACHE * dflt_key_cache
Definition: keycache.h:135
KEY_CACHE * create_key_cache(std::string_view name)
Create a MyISAM Multiple Key Cache.
Definition: keycaches.cc:76
KEY_CACHE * get_key_cache(std::string_view cache_name)
Resolve a MyISAM Multiple Key Cache by name.
Definition: keycaches.cc:68
KEY_CACHE zero_key_cache
@nonexistent_cache.param->value_ptr() points here
Definition: keycaches.cc:66
static std::string to_string(const LEX_STRING &str)
Definition: lex_string.h:50
#define comment
Definition: lexyy.cc:959
@ READ_ONLY
The opened file can be only read.
A better implementation of the UNIX ctype(3) library.
int my_strcasecmp(const CHARSET_INFO *cs, const char *s1, const char *s2)
Definition: m_ctype.h:651
MYSQL_STRINGS_EXPORT CHARSET_INFO my_charset_latin1
Definition: ctype-latin1.cc:366
MYSQL_PLUGIN_IMPORT CHARSET_INFO * system_charset_info
Definition: mysqld.cc:1554
static mi_bit_type mask[]
Definition: mi_packrec.cc:141
This file includes constants used by all storage engines.
Header for compiler-dependent features.
#define DBUG_SET_INITIAL(a1)
Definition: my_dbug.h:192
#define DBUG_EXECUTE_IF(keyword, a1)
Definition: my_dbug.h:171
#define DBUG_PRINT(keyword, arglist)
Definition: my_dbug.h:181
#define DBUG_EXPLAIN(buf, len)
Definition: my_dbug.h:199
#define DBUG_SET(a1)
Definition: my_dbug.h:191
#define DBUG_EXPLAIN_INITIAL(buf, len)
Definition: my_dbug.h:200
#define DBUG_POP()
Definition: my_dbug.h:190
#define DBUG_TRACE
Definition: my_dbug.h:146
#define GET_NO_ARG
Definition: my_getopt.h:44
get_opt_arg_type
Enumeration of the my_option::arg_type attributes.
Definition: my_getopt.h:81
@ OPT_ARG
Definition: my_getopt.h:81
@ NO_ARG
Definition: my_getopt.h:81
#define GET_STR
Definition: my_getopt.h:52
#define GET_DOUBLE
Definition: my_getopt.h:57
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp, bool *fix)
Definition: my_getopt.cc:1262
#define GET_SET
Definition: my_getopt.h:56
#define GET_ENUM
Definition: my_getopt.h:55
#define GET_FLAGSET
Definition: my_getopt.h:58
#define GET_STR_ALLOC
Definition: my_getopt.h:53
ulonglong getopt_double2ulonglong(double)
Returns an ulonglong value containing a raw representation of the given double value.
Definition: my_getopt.cc:160
double getopt_double_limit_value(double num, const struct my_option *optp, bool *fix)
Definition: my_getopt.cc:1302
double getopt_ulonglong2double(ulonglong)
Returns the double value which corresponds to the given raw representation.
Definition: my_getopt.cc:171
ulonglong max_of_int_range(int var_type)
Maximum possible value for an integer GET_* variable type.
Definition: my_getopt.cc:1163
#define GET_ASK_ADDR
Definition: my_getopt.h:71
#define GET_BOOL
Definition: my_getopt.h:45
longlong getopt_ll_limit_value(longlong, const struct my_option *, bool *fix)
Definition: my_getopt.cc:1190
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
unsigned char uchar
Definition: my_inttypes.h:52
intptr_t intptr
Definition: my_inttypes.h:70
long long int longlong
Definition: my_inttypes.h:55
#define MYF(v)
Definition: my_inttypes.h:97
void my_free(void *ptr)
Frees the memory pointed by the ptr.
Definition: my_memory.cc:81
Common header for many mysys elements.
uint test_flags
Definition: mysqld.cc:1341
const char * show_comp_option_name[]
Definition: mysqld.cc:1054
char system_time_zone_dst_off[30]
Definition: mysqld.cc:1491
bool opt_bin_log
Definition: mysqld.cc:1204
Tsid_map * global_tsid_map
Definition: mysqld.cc:1838
Gtid_state * gtid_state
Global state of GTIDs.
Definition: mysqld.cc:1839
Checkable_rwlock * global_tsid_lock
Protects Gtid_state. See comment above gtid_state for details.
Definition: mysqld.cc:1837
struct System_variables max_system_variables
Definition: mysqld.cc:1548
char system_time_zone_dst_on[30]
Definition: mysqld.cc:1491
static char * path
Definition: mysqldump.cc:149
arg_type
Definition: mysqltest.cc:1146
int find_set(REP_SETS *sets, REP_SET *find)
Definition: mysqltest.cc:11295
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1105
Definition: buf0block_hint.cc:30
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:908
Provides atomic access in shared-exclusive modes.
Definition: shared_spin_lock.h:79
size_t size(const char *const c)
Definition: base64.h:46
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
required string type
Definition: replication_group_member_actions.proto:34
bool throw_bounds_warning(THD *thd, const char *name, bool fixed, bool is_unsigned, longlong v)
Throw warning (error in STRICT mode) if value for variable needed bounding.
Definition: set_var.cc:554
"public" interface to sys_var - server configuration variables.
enum enum_mysql_show_type SHOW_TYPE
Definition: set_var.h:75
@ OPT_GLOBAL
Definition: set_var.h:95
Declarations for the Debug Sync Facility.
plugin_ref ha_resolve_by_name(THD *thd, const LEX_CSTRING *name, bool is_temp_table)
Return the storage engine handlerton for the supplied name.
Definition: handler.cc:405
File containing constants that can be used throughout the server.
SHOW_COMP_OPTION
Definition: sql_const.h:230
constexpr const size_t STRING_BUFFER_USUAL_SIZE
Definition: sql_const.h:126
void push_warning_printf(THD *thd, Sql_condition::enum_severity_level severity, uint code, const char *format,...)
Push the warning to error list if there is still room in the list.
Definition: sql_error.cc:690
void plugin_unlock(THD *thd, plugin_ref plugin)
Definition: sql_plugin.cc:1261
#define my_plugin_lock_by_name(A, B, C)
Definition: sql_plugin.h:175
#define my_plugin_lock(A, B)
Definition: sql_plugin.h:177
LEX_CSTRING * plugin_name(st_plugin_int **ref)
Definition: sql_plugin_ref.h:95
Our own string classes, used pervasively throughout the executor.
bool validate_string(const CHARSET_INFO *cs, const char *str, size_t length, size_t *valid_length, bool *length_error)
Check if an input byte sequence is a valid character string of a given charset.
Definition: sql_string.cc:1132
@ SHOW_DOUBLE
Definition: status_var.h:40
@ SHOW_CHAR_PTR
Definition: status_var.h:37
@ SHOW_MY_BOOL
Definition: status_var.h:50
@ SHOW_CHAR
Definition: status_var.h:36
@ SHOW_LEX_STRING
Definition: status_var.h:55
char * set_to_string(THD *thd, LEX_STRING *result, ulonglong set, const char *lib[], bool quoted)
Definition: strfunc.cc:270
char * flagset_to_string(THD *thd, LEX_STRING *result, ulonglong set, const char *lib[])
Definition: strfunc.cc:303
A small wrapper class to pass getopt arguments as a pair to the Sys_var_* constructors.
Definition: sys_vars.h:176
int id
Definition: sys_vars.h:177
CMD_LINE(enum get_opt_arg_type getopt_arg_type, int getopt_id=0)
Definition: sys_vars.h:179
enum get_opt_arg_type arg_type
Definition: sys_vars.h:178
Holds information about a Gtid_set.
Definition: rpl_gtid.h:2540
Gtid_set * get_gtid_set() const
Return NULL if this is NULL, otherwise return the Gtid_set.
Definition: rpl_gtid.h:2546
This struct represents a specification of a GTID for a statement to be executed: either "AUTOMATIC",...
Definition: rpl_gtid.h:3999
static const int MAX_TEXT_LENGTH
Definition: rpl_gtid.h:4126
static const int MAX_TEXT_LENGTH
The maximal length of the textual representation of a TSID, not including the terminating '\0'.
Definition: rpl_gtid.h:1138
rpl_sidno sidno
SIDNO of this Gtid.
Definition: rpl_gtid.h:1105
int to_string(const Tsid &tsid, char *buf) const
Convert a Gtid to a string.
Definition: rpl_gtid_misc.cc:214
Definition: keycache.h:73
bool in_init
Definition: keycache.h:131
Definition: mysql_lex_string.h:40
const char * str
Definition: mysql_lex_string.h:41
size_t length
Definition: mysql_lex_string.h:42
Definition: mysql_lex_string.h:35
char * str
Definition: mysql_lex_string.h:36
size_t length
Definition: mysql_lex_string.h:37
Definition: sys_vars.h:752
uint number
Definition: sys_vars.h:754
const char * alias
Definition: sys_vars.h:753
Definition: system_variables.h:203
const char ** type_names
Definition: typelib.h:38
size_t count
Definition: typelib.h:36
const char * name
Definition: typelib.h:37
unsigned int * type_lengths
Definition: typelib.h:39
Definition: my_getopt.h:83
const char * comment
option comment, for autom.
Definition: my_getopt.h:113
longlong min_value
Min allowed value (for numbers)
Definition: my_getopt.h:123
ulonglong max_value
Max allowed value (for numbers)
Definition: my_getopt.h:124
longlong def_value
Default value.
Definition: my_getopt.h:122
long block_size
Value should be a mult.
Definition: my_getopt.h:127
const char * name
Name of the option.
Definition: my_getopt.h:94
void * u_max_value
The user def.
Definition: my_getopt.h:118
ulong var_type
GET_BOOL, GET_ULL, etc.
Definition: my_getopt.h:120
TYPELIB * typelib
Pointer to possible values.
Definition: my_getopt.h:119
void * value
A pointer to the variable value.
Definition: my_getopt.h:117
Definition: sql_plugin_ref.h:45
Definition: sql_connect.h:70
USER_RESOURCES user_resources
Definition: sql_connect.h:94
uint user_conn
Definition: sql_connect.h:52
#define NO_CMD_LINE
Definition: sys_vars.h:129
Sys_var_integer< ulong, GET_ULONG, SHOW_LONG, false > Sys_var_ulong
Definition: sys_vars.h:339
#define keycache_var_ptr(KC, OFF)
Definition: sys_vars.h:1297
#define keycache_var(KC, OFF)
Definition: sys_vars.h:1298
charset_enum
Definition: sys_vars.h:165
@ IN_SYSTEM_CHARSET
Definition: sys_vars.h:165
@ IN_FS_CHARSET
Definition: sys_vars.h:165
#define NON_PERSIST
Definition: sys_vars.h:147
#define MAX_SET(X)
Definition: sys_vars.h:1508
Sys_var_integer< uint, GET_UINT, SHOW_INT, false > Sys_var_uint
Definition: sys_vars.h:338
sys_var_chain all_sys_vars
Definition: set_var.cc:142
Sys_var_integer< int32, GET_UINT, SHOW_INT, false > Sys_var_int32
Definition: sys_vars.h:337
constexpr const unsigned long MAX_CONNECTIONS_DEFAULT
Maximum number of connections default value.
Definition: sys_vars.h:111
void update_parser_max_mem_size()
Definition: sys_vars.cc:3205
const char * fixup_enforce_gtid_consistency_command_line(char *value_arg)
Definition: sys_vars.cc:6339
#define session_var(THD, TYPE)
Definition: sys_vars.h:158
Sys_var_integer< long, GET_LONG, SHOW_SIGNED_LONG, true > Sys_var_long
Definition: sys_vars.h:344
constexpr const unsigned long TABLE_DEF_CACHE_DEFAULT
Definition: sys_vars.h:105
#define GLOBAL_VAR(X)
Definition: sys_vars.h:120
bool(* keycache_update_function)(THD *, KEY_CACHE *, ptrdiff_t, ulonglong)
Definition: sys_vars.h:1299
void update_optimizer_switch()
Definition: sys_vars.cc:3215
static const char * bool_values[3]
Definition: sys_vars.h:167
constexpr const unsigned long TABLE_OPEN_CACHE_DEFAULT
Definition: sys_vars.h:104
#define global_var(TYPE)
Definition: sys_vars.h:159
Sys_var_integer< ha_rows, GET_HA_ROWS, SHOW_HA_ROWS, false > Sys_var_harows
Definition: sys_vars.h:341
Sys_var_integer< ulonglong, GET_ULL, SHOW_LONGLONG, false > Sys_var_ulonglong
Definition: sys_vars.h:343
"protected" interface to sys_var - server configuration variables.
enum_variable_source
This enum values define how system variables are set.
Definition: system_variable_source_type.h:33
int find_type(const char *x, const TYPELIB *typelib, unsigned int flags)
uint64_t find_set_from_flags(const TYPELIB *lib, int default_name, uint64_t cur_set, uint64_t default_set, const char *str, unsigned int length, const char **err_pos, unsigned int *err_len)
Time_zone * my_tz_find(const int64 displacement)
Item_result
Type of the user defined function return slot and arguments.
Definition: udf_registration_types.h:39
@ STRING_RESULT
not valid for UDFs
Definition: udf_registration_types.h:41
@ DECIMAL_RESULT
not valid for UDFs
Definition: udf_registration_types.h:45
@ REAL_RESULT
char *
Definition: udf_registration_types.h:42
@ INT_RESULT
double
Definition: udf_registration_types.h:43
unsigned long id[MAX_DEAD]
Definition: xcom_base.cc:510