1#ifndef SYS_VARS_H_INCLUDED
2#define SYS_VARS_H_INCLUDED
59#include "mysqld_error.h"
97template <
typename Struct_type,
typename Name_getter>
99template <
typename T, u
long ARGT, enum enum_mysql_show_type SHOWT,
bool SIGNED>
115#define VALID_RANGE(X, Y) X, Y
117#define BLOCK_SIZE(X) X
118#define GLOBAL_VAR(X) \
119 sys_var::GLOBAL, (((const char *)&(X)) - (char *)&global_system_variables), \
121#define SESSION_VAR(X) \
122 sys_var::SESSION, offsetof(System_variables, X), \
123 sizeof(((System_variables *)0)->X)
124#define SESSION_ONLY(X) \
125 sys_var::ONLY_SESSION, offsetof(System_variables, X), \
126 sizeof(((System_variables *)0)->X)
127#define NO_CMD_LINE CMD_LINE(NO_ARG, -1)
132#define NO_MUTEX_GUARD ((PolyLock *)0)
133#define IN_BINLOG sys_var::SESSION_VARIABLE_IN_BINLOG
134#define NOT_IN_BINLOG sys_var::VARIABLE_NOT_IN_BINLOG
137#define PRE_UPDATE(X) X
138#define ON_UPDATE(X) X
139#define READ_ONLY sys_var::READONLY +
140#define NOT_VISIBLE sys_var::INVISIBLE +
141#define UNTRACKED_DEFAULT sys_var::TRI_LEVEL +
142#define HINT_UPDATEABLE sys_var::HINT_UPDATEABLE +
144#define PREALLOCATED sys_var::ALLOCATED +
145#define NON_PERSIST sys_var::NOTPERSIST +
146#define PERSIST_AS_READONLY sys_var::PERSIST_AS_READ_ONLY +
147#define SENSITIVE sys_var::SENSITIVE +
153#define REVERSE(X) ~(X)
154#define DEPRECATED_VAR(X) X
156#define session_var(THD, TYPE) (*(TYPE *)session_var_ptr(THD))
157#define global_var(TYPE) (*(TYPE *)global_var_ptr())
159#define GET_HA_ROWS GET_ULL
195template <
typename T, u
long ARGT, enum enum_mysql_show_type SHOWT,
bool SIGNED>
199 const char *name_arg,
const char *
comment,
int flag_args,
200 ptrdiff_t off,
size_t size [[maybe_unused]],
CMD_LINE getopt,
201 T min_val, T max_val, T def_val,
uint block_size,
206 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
209 binlog_status_arg, on_check_func, on_update_func,
210 substitute, parse_flag) {
212 if ((min_val % block_size) != 0)
213 min_val += block_size - (min_val % block_size);
223 assert(size ==
sizeof(T));
224 assert(min_val <= def_val);
225 assert(def_val <= max_val);
226 assert(block_size > 0);
228 assert(def_val % block_size == 0);
379 const char *deprecation_substitute_arg,
380 sys_var *persisted_alias,
bool is_persisted_deprecated)
387 persisted_alias, is_persisted_deprecated),
464 std::string_view keycache_name)
override {
468 std::string_view keycache_name)
override {
558 m_comment = std::string(
"This option is deprecated. Use ") +
581 binlog_status_arg, on_check_func, on_update_func, substitute,
596 if (!(res = var->value->val_str(&
str)))
598 else if (!(var->save_result.ulonglong_value =
602 var->save_result.ulonglong_value--;
604 longlong tmp = var->value->val_int();
608 var->save_result.ulonglong_value = tmp;
635 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
636 size_t size [[maybe_unused]],
CMD_LINE getopt,
const char *values[],
641 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
643 values, def_val,
lock, binlog_status_arg, on_check_func,
644 on_update_func, substitute, parse_flag) {
648 assert(size ==
sizeof(ulong));
670 std::string_view)
override {
671 return pointer_cast<const uchar *>(
688 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
689 size_t size [[maybe_unused]],
CMD_LINE getopt,
bool def_val,
694 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
697 on_check_func, on_update_func, substitute, parse_flag) {
701 assert(size ==
sizeof(
bool));
801 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
802 size_t size [[maybe_unused]],
CMD_LINE getopt,
const ALIAS aliases_arg[],
803 uint value_count_arg,
uint def_val,
uint command_line_no_value_arg,
808 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
811 on_check_func, on_update_func, substitute, parse_flag),
826 assert(size ==
sizeof(ulong));
860 if (value_str ==
nullptr) {
867 if (value != -1)
goto end;
870 value = strtol(value_str, &
end, 10);
872 if (
end > value_str && *
end ==
'\0')
890 if (!res)
return true;
896 &valid_len, &len_error))
900 if (value == -1)
return true;
1011 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1012 size_t size [[maybe_unused]],
CMD_LINE getopt,
1013 enum charset_enum is_os_charset_arg,
const char *def_val,
1018 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
1021 binlog_status_arg, on_check_func, on_update_func, substitute,
1026 assert(size ==
sizeof(
char *));
1031 flags &= ~ALLOCATED;
1088 :
const_cast<char *
>(
"");
1103 ptrdiff_t off,
size_t size,
CMD_LINE getopt,
1104 enum charset_enum is_os_charset_arg,
const char *def_val)
1106 is_os_charset_arg, def_val) {}
1111 std::string_view keycache_name)
override {
1115 static const char *altered_value =
"some-other-version";
1116 const uchar *altered_value_ptr = pointer_cast<uchar *>(&altered_value);
1117 value = altered_value_ptr;
1156 std::string_view)
override {
1158 return proxy_user[0] ? pointer_cast<const uchar *>(proxy_user) :
nullptr;
1170 std::string_view)
override {
1172 return external_user.
length ? pointer_cast<const uchar *>(external_user.
str)
1192 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1193 size_t size [[maybe_unused]],
CMD_LINE getopt,
1194 enum charset_enum is_os_charset_arg,
const char *def_val,
1199 const char *substitute =
nullptr)
1201 getopt, is_os_charset_arg, def_val,
lock,
1202 binlog_status_arg, on_check_func, on_update_func,
1230 const char *name_arg,
const char *
comment,
int flag_args,
CMD_LINE getopt,
1235 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
1238 binlog_status_arg, on_check_func, on_update_func, substitute,
1276 std::string_view)
override {
1292#define KEYCACHE_VAR(X) \
1293 sys_var::GLOBAL, offsetof(KEY_CACHE, X), sizeof(((KEY_CACHE *)0)->X)
1294#define keycache_var_ptr(KC, OFF) (((uchar *)(KC)) + (OFF))
1295#define keycache_var(KC, OFF) (*(ulonglong *)keycache_var_ptr(KC, OFF))
1315 ptrdiff_t off,
size_t size,
CMD_LINE getopt,
1321 const char *substitute =
nullptr)
1323 name_arg,
comment, flag_args, -1,
1324 size, getopt, min_val, max_val, def_val, block_size,
lock,
1325 binlog_status_arg, on_check_func,
nullptr, substitute),
1344 "is deprecated and will be removed in a "
1362 if (key_cache->
in_init)
return true;
1367 std::string_view keycache_name)
override {
1368 if (!keycache_name.empty())
1370 ER_WARN_DEPRECATED_SYNTAX,
1371 "@@global.%.*s.%s syntax "
1372 "is deprecated and will be removed in a "
1374 static_cast<int>(keycache_name.size()),
1375 keycache_name.data(),
name.
str);
1393 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1394 size_t size [[maybe_unused]],
CMD_LINE getopt,
double min_val,
1395 double max_val,
double def_val,
PolyLock *
lock =
nullptr,
1399 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
1403 binlog_status_arg, on_check_func, on_update_func, substitute,
1409 assert(min_val <= max_val);
1410 assert(min_val <= def_val);
1411 assert(max_val >= def_val);
1412 assert(size ==
sizeof(
double));
1485 const char *name_arg,
const char *
comment,
int, ptrdiff_t off,
1491 const char *substitute =
nullptr)
1493 max_val, def_val, block_size,
lock, binlog_status_arg,
1494 on_check_func, on_update_func, substitute) {}
1496 std::string_view keycache_name)
override {
1505#define MAX_SET(X) ((((1ULL << ((X)-1)) - 1) << 1) | 1)
1524 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1525 size_t size [[maybe_unused]],
CMD_LINE getopt,
const char *values[],
1530 const char *substitute =
nullptr)
1532 values, def_val,
lock, binlog_status_arg, on_check_func,
1533 on_update_func, substitute) {
1539 assert(strcmp(values[
typelib.
count - 1],
"default") == 0);
1572 if ((tmp < 0 && !var->value->unsigned_flag) ||
1601 std::string_view)
override {
1624 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1625 size_t size [[maybe_unused]],
CMD_LINE getopt,
const char *values[],
1630 const char *substitute =
nullptr)
1632 values, def_val,
lock, binlog_status_arg, on_check_func,
1633 on_update_func, substitute) {
1655 nullptr, &
error, &error_len, ¬_used);
1669 if ((tmp < 0 && !var->value->unsigned_flag) ||
1698 std::string_view)
override {
1727 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1728 size_t size [[maybe_unused]],
CMD_LINE getopt,
int plugin_type_arg,
1733 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
1736 binlog_status_arg, on_check_func, on_update_func, substitute,
1741 assert(getopt.
id == -1);
1773 if (oldval != newval) {
1793 pname.
str = *default_value;
1814 std::string_view)
override {
1828#if defined(ENABLED_DEBUG_SYNC)
1832class Sys_var_debug_sync :
public sys_var {
1835 const char *name_arg,
const char *
comment,
int flag_args,
CMD_LINE getopt,
1837 enum binlog_status_enum binlog_status_arg = VARIABLE_NOT_IN_BINLOG,
1838 on_check_function on_check_func =
nullptr,
1839 on_update_function on_update_func =
nullptr,
1840 const char *substitute =
nullptr,
int parse_flag = PARSE_NORMAL)
1843 binlog_status_arg, on_check_func, on_update_func, substitute,
1845 assert(
scope() == ONLY_SESSION);
1875 std::string_view)
override {
1876 return debug_sync_value_ptr(running_thd);
1919 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
1926 const char *substitute =
nullptr)
1929 on_check_func, on_update_func, substitute) {
1935 assert(getopt.
id == -1);
1956 std::string_view)
override {
1999 const char *substitute =
nullptr)
2001 getopt, min_val, max_val, 0, block_size,
lock,
2002 binlog_status_arg, on_check_func,
nullptr,
2007 assert(getopt.
id == -1);
2017 var->
value =
nullptr;
2024 std::string_view)
override {
2046 const char *name_arg,
const char *
comment,
int flag_args,
CMD_LINE getopt,
2052 const char *substitute =
nullptr)
2054 min_val, max_val, 0.0,
lock, binlog_status_arg,
2055 on_check_func,
nullptr, substitute),
2059 assert(getopt.
id == -1);
2069 var->
value =
nullptr;
2076 std::string_view)
override {
2099 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2104 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
2107 on_check_func, on_update_func, substitute, parse_flag) {
2109 assert(getopt.
id == -1);
2110 assert(
lock ==
nullptr);
2136 return pointer_cast<const uchar *>(
2161 const char *substitute =
nullptr)
2194template <
typename Struct_type,
typename Name_getter>
2198 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2199 size_t size [[maybe_unused]],
CMD_LINE getopt,
void *def_val,
2204 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
2207 binlog_status_arg, on_check_func, on_update_func, substitute,
2218 assert(getopt.
id == -1);
2219 assert(size ==
sizeof(
void *));
2238 const Struct_type *ptr =
2241 strcpy(def_val, pointer_cast<const char *>(Name_getter(ptr).get_name()));
2247 std::string_view)
override {
2248 const Struct_type *ptr =
session_var(target_thd,
const Struct_type *);
2249 return ptr ? Name_getter(ptr).get_name() :
nullptr;
2252 const Struct_type *ptr =
global_var(
const Struct_type *);
2253 return ptr ? Name_getter(ptr).get_name() :
nullptr;
2270 ptrdiff_t off,
size_t size [[maybe_unused]],
CMD_LINE getopt,
2275 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
2278 binlog_status_arg, on_check_func, on_update_func, substitute,
2280 assert(getopt.
id == -1);
2289 if (!res)
return true;
2316 std::string_view)
override {
2326 return pointer_cast<const uchar *>(
2330 return pointer_cast<const uchar *>(
2347 int flag_args, ptrdiff_t off,
size_t size,
2348 CMD_LINE getopt,
const char *values[],
2353 def_val,
lock, binlog_status_arg, on_check_func) {}
2369 int flag_args, ptrdiff_t off,
size_t size,
2374 lock, binlog_status_arg, on_check_func) {}
2385 int flag_args, ptrdiff_t off,
size_t size,
2386 CMD_LINE getopt,
const char *values[],
2391 size, getopt, values, def_val,
lock, binlog_status_arg,
2402 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2403 size_t size [[maybe_unused]],
CMD_LINE getopt,
const char *def_val,
2408 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
2411 binlog_status_arg, on_check_func, on_update_func, substitute,
2437 std::string_view)
override {
2445 return (
uchar *)ret;
2453#ifdef HAVE_GTID_NEXT_LIST
2461class Sys_var_gtid_set :
public sys_var {
2464 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2466 enum binlog_status_enum binlog_status_arg = VARIABLE_NOT_IN_BINLOG,
2467 on_check_function on_check_func = 0,
2468 on_update_function on_update_func = 0,
const char *substitute = 0,
2469 int parse_flag = PARSE_NORMAL)
2472 binlog_status_arg, on_check_func, on_update_func, substitute,
2485 char *ptr = (
char *)(
intptr)option.def_value;
2513 const std::string &)
override {
2620 time_t current_time = time(
nullptr);
2623 current_time = 1616893190;
2627 current_time = 1616893200;
2631 localtime_r(¤t_time, &tm_tmp);
2643 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2648 const char *substitute =
nullptr,
int parse_flag =
PARSE_NORMAL)
2651 binlog_status_arg, on_check_func, on_update_func, substitute,
2676 if (!res)
return true;
2730 std::string_view)
override {
2732 char *
buf =
nullptr;
2733 bool remote = (target_thd != running_thd);
2741#ifdef HAVE_GTID_NEXT_LIST
2743 target_thd->owned_gtid_set.get_string_length() + 1);
2746 target_thd->owned_gtid_set.to_string(
buf);
2783 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2784 size_t size,
CMD_LINE getopt,
const char *values[],
uint def_val,
2789 def_val,
lock, binlog_status_arg, on_check_func) {}
2797 const char *name_arg,
const char *
comment,
int flag_args, ptrdiff_t off,
2805 lock, binlog_status_arg, on_check_func) {}
2813 int flag_args, ptrdiff_t off,
size_t size,
2818 size, getopt, def_val,
lock, binlog_status_arg,
void rdlock()
Acquire the read lock.
Definition: rpl_gtid.h:460
void wrlock()
Acquire the write lock.
Definition: rpl_gtid.h:469
void unlock()
Release the lock (whether it is a write or read lock).
Definition: rpl_gtid.h:480
Definition: sql_error.h:225
Represents a set of GTIDs.
Definition: rpl_gtid.h:1455
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:568
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:869
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:761
const Gtid_set * get_executed_gtids() const
Definition: rpl_gtid.h:3195
const Gtid_set * get_lost_gtids() const
Return a pointer to the Gtid_set that contains the lost gtids.
Definition: rpl_gtid.h:3190
const Owned_gtids * get_owned_gtids() const
Return a pointer to the Owned_gtids that contains the owned gtids.
Definition: rpl_gtid.h:3211
int32 get_anonymous_ownership_count()
Return the number of clients that hold anonymous ownership.
Definition: rpl_gtid.h:2865
virtual double val_real()=0
virtual longlong val_int()=0
virtual Item_result result_type() const
Definition: item.h:1332
bool unsigned_flag
Definition: item.h:3496
virtual String * val_str(String *str)=0
Represents the set of GTIDs that are owned by some thread.
Definition: rpl_gtid.h:2417
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:2512
int to_string(char *out) const
Write a string representation of this Owned_gtids to the given buffer.
Definition: rpl_gtid.h:2485
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:432
LEX_CSTRING external_user() const
Getter method for member m_external_user.
Definition: sql_security_ctx.h:447
LEX_CSTRING proxy_user() const
Getter method for member m_proxy_user.
Definition: sql_security_ctx.cc:1039
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:168
LEX_CSTRING lex_cstring() const
Definition: sql_string.h:276
const CHARSET_INFO * charset() const
Definition: sql_string.h:241
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:629
const char * ptr() const
Definition: sql_string.h:250
size_t length() const
Definition: sql_string.h:242
A sys_var that is an alias for another sys_var.
Definition: sys_vars.h:352
bool set_user(const char *usr) override
Definition: sys_vars.h:434
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:378
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.h:458
const char * get_host() override
Definition: sys_vars.h:436
ulonglong get_max_value() override
Definition: sys_vars.h:409
sys_var & m_base_var
Definition: sys_vars.h:354
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:455
bool is_non_persistent() override
Definition: sys_vars.h:417
void set_timestamp(ulonglong ts) override
Definition: sys_vars.h:443
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:463
void cleanup() override
All the cleanup procedures should be performed here.
Definition: sys_vars.h:400
Sys_var_alias(const char *name_arg, sys_var &base_var)
Definition: sys_vars.h:394
ulonglong get_timestamp() const override
Definition: sys_vars.h:438
void set_source(enum_variable_source src) override
Definition: sys_vars.h:428
void update_default(longlong new_def_value) override
Definition: sys_vars.h:404
longlong get_default() override
Definition: sys_vars.h:407
void session_save_default(THD *thd, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:449
void set_timestamp() override
Definition: sys_vars.h:442
sys_var & get_base_var()
Definition: sys_vars.h:398
void set_user_host(THD *thd) override
Definition: sys_vars.h:441
const char * get_user() override
Definition: sys_vars.h:435
bool set_source_name(const char *path) override
Definition: sys_vars.h:431
void set_arg_source(get_opt_arg_source *arg_source) override
Definition: sys_vars.h:411
const uchar * global_value_ptr(THD *thd, std::string_view keycache_name) override
Definition: sys_vars.h:467
void set_is_plugin(bool is_plugin) override
Definition: sys_vars.h:414
bool check_update_type(Item_result type) override
Definition: sys_vars.h:421
void global_save_default(THD *thd, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:452
const char * get_source_name() override
Definition: sys_vars.h:425
ulong get_var_type() override
Returns variable type.
Definition: sys_vars.h:410
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:418
enum_variable_source get_source() override
Definition: sys_vars.h:424
sys_var_pluginvar * cast_pluginvar() override
downcast for sys_var_pluginvar.
Definition: sys_vars.h:401
longlong get_min_value() override
Definition: sys_vars.h:408
bool set_host(const char *hst) override
Definition: sys_vars.h:437
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:446
Definition: sys_vars.h:2810
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:2812
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.cc:7371
The class for bit variables - a variant of boolean that stores the value in a bit.
Definition: sys_vars.h:1907
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:1918
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1949
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:1952
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:1955
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:1946
void set(uchar *ptr, ulonglong value)
Definition: sys_vars.h:1910
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1938
ulonglong bitmask
Definition: sys_vars.h:1908
bool reverse_semantics
Definition: sys_vars.h:1909
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:1962
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:1942
The class for boolean variables - a variant of ENUM variables with the fixed list of values of { OFF ...
Definition: sys_vars.h:685
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:708
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:687
void session_save_default(THD *thd, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:712
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:719
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:716
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:703
Abstract base class for read-only variables (global or session) of string type where the value is gen...
Definition: sys_vars.h:2542
bool session_update(THD *, set_var *) override
Definition: sys_vars.h:2555
Sys_var_charptr_func(const char *name_arg, const char *comment, flag_enum flag_arg)
Definition: sys_vars.h:2544
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:2576
bool check_update_type(Item_result) override
Definition: sys_vars.h:2572
bool do_check(THD *, set_var *) override
Definition: sys_vars.h:2568
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2565
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:2559
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2580
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:2564
void session_save_default(THD *, set_var *) override
save the session default value of the variable in var
Definition: sys_vars.h:2563
The class for string variables.
Definition: sys_vars.h:1008
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:1034
bool check_update_type(Item_result type) override
Definition: sys_vars.h:1095
void cleanup() override
All the cleanup procedures should be performed here.
Definition: sys_vars.h:1029
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:1091
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1075
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:1069
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1058
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.cc:4292
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:1010
@session.dbug and @global.dbug variables.
Definition: sys_vars.h:1227
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:1242
void session_save_default(THD *, set_var *) override
save the session default value of the variable in var
Definition: sys_vars.h:1266
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:1275
bool check_update_type(Item_result type) override
Definition: sys_vars.h:1286
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:1281
bool session_update(THD *, set_var *var) override
Definition: sys_vars.h:1253
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:1261
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:1229
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:1271
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1267
A deprecated alias for a variable.
Definition: sys_vars.h:551
std::string m_comment
Definition: sys_vars.h:553
Sys_var_deprecated_alias(const char *name_arg, sys_var &base_var)
Definition: sys_vars.h:556
The class for floating point variables.
Definition: sys_vars.h:1390
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:1426
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:1439
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1422
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:1392
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1436
bool check_update_type(Item_result type) override
Definition: sys_vars.h:1430
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:1414
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:1433
Definition: sys_vars.h:2794
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:2796
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.cc:4755
A class for @global.binlog_checksum that has a specialized update method.
Definition: sys_vars.h:2382
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.cc:4308
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:2384
The class for ENUM variables - variables that take one value from a fixed list of values.
Definition: sys_vars.h:632
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:659
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:655
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:665
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:634
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:669
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:662
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:674
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:650
Definition: sys_vars.h:1162
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:1169
Sys_var_external_user(const char *name_arg, const char *comment_arg, enum charset_enum is_os_charset_arg)
Definition: sys_vars.h:1164
The class for flagset variables - a variant of SET that allows in-place editing (turning on/off indiv...
Definition: sys_vars.h:1521
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:1585
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:1600
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1581
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:1606
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1592
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:1542
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:1589
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:1523
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:1595
Class for @global.gtid_executed.
Definition: sys_vars.h:2589
Sys_var_gtid_executed(const char *name_arg, const char *comment_arg)
Definition: sys_vars.h:2591
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:2594
Definition: sys_vars.h:2780
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:2782
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:4458
Class for gtid_next.
Definition: sys_vars.h:2399
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:2428
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:2436
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.cc:4342
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2447
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2429
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:2417
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:2421
bool do_check(THD *, set_var *) override
Definition: sys_vars.h:2432
bool check_update_type(Item_result type) override
Definition: sys_vars.h:2433
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:2401
Definition: sys_vars.h:2723
Sys_var_gtid_owned(const char *name_arg, const char *comment_arg)
Definition: sys_vars.h:2725
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:2766
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:2729
Class for @session.gtid_purged.
Definition: sys_vars.h:2640
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.cc:6703
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:2717
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:2663
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:2671
bool check_update_type(Item_result type) override
Definition: sys_vars.h:2689
bool session_update(THD *, set_var *) override
Definition: sys_vars.h:2654
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:2693
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:2642
void session_save_default(THD *, set_var *) override
save the session default value of the variable in var
Definition: sys_vars.h:2659
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2667
A subclass of Sys_var_have to return dynamic values.
Definition: sys_vars.h:2149
static enum SHOW_COMP_OPTION dummy_
Definition: sys_vars.h:2178
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:2172
enum SHOW_COMP_OPTION(* func_)(THD *)
Definition: sys_vars.h:2177
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:2159
The class for read-only variables that show whether a particular feature is supported by the server.
Definition: sys_vars.h:2096
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:2124
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:2098
void session_save_default(THD *, set_var *) override
save the session default value of the variable in var
Definition: sys_vars.h:2128
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2135
bool check_update_type(Item_result) override
Definition: sys_vars.h:2139
bool do_check(THD *, set_var *) override
Definition: sys_vars.h:2116
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:2129
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:2131
bool session_update(THD *, set_var *) override
Definition: sys_vars.h:2120
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2130
Sys_var_integer template is used to generate Sys_var_* classes for variables that represent the value...
Definition: sys_vars.h:196
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:314
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:198
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:231
T * max_var_ptr()
Definition: sys_vars.h:327
void session_save_default(THD *thd, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:310
bool check_update_type(Item_result type) override
Definition: sys_vars.h:307
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:299
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:317
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:303
The class for keycache_* variables.
Definition: sys_vars.h:1310
const uchar * global_value_ptr(THD *thd, std::string_view keycache_name) override
Definition: sys_vars.h:1366
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:1314
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1333
keycache_update_function keycache_update
Definition: sys_vars.h:1311
The class for string variables.
Definition: sys_vars.h:1189
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:1191
bool global_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1208
The class for the max_user_connections.
Definition: sys_vars.h:1482
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:1484
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:1495
A variant of enum where:
Definition: sys_vars.h:748
uint command_line_no_value
Definition: sys_vars.h:993
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:992
const uint value_count
The number of allowed numeric values.
Definition: sys_vars.h:982
uint alias_count
The number of elements of aliases (computed in the constructor).
Definition: sys_vars.h:986
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:953
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:927
const ALIAS * aliases
Array of all textual aliases.
Definition: sys_vars.h:984
bool check_update_type(Item_result type) override
Definition: sys_vars.h:912
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:964
bool session_update(THD *, set_var *) override
Definition: sys_vars.h:915
void session_save_default(THD *, set_var *) override
save the session default value of the variable in var
Definition: sys_vars.h:940
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:833
bool do_check(THD *, set_var *var) override
Definition: sys_vars.h:884
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:800
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:960
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:854
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:975
The class for variables which value is a plugin.
Definition: sys_vars.h:1722
bool check_update_type(Item_result type) override
Definition: sys_vars.h:1810
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:1743
void session_save_default(THD *thd, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:1786
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:1806
void global_save_default(THD *thd, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1790
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:1813
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1778
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:1726
void do_update(plugin_ref *valptr, plugin_ref newval)
Definition: sys_vars.h:1771
int plugin_type
Definition: sys_vars.h:1723
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:1782
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:1820
Definition: sys_vars.h:1124
void session_save_default(THD *, set_var *) override
save the session default value of the variable in var
Definition: sys_vars.h:1147
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:1155
bool check_update_type(Item_result) override
Definition: sys_vars.h:1152
bool session_update(THD *, set_var *) override
Definition: sys_vars.h:1139
bool do_check(THD *, set_var *) override
Definition: sys_vars.h:1135
Sys_var_proxy_user(const char *name_arg, const char *comment, enum charset_enum is_os_charset_arg)
Definition: sys_vars.h:1126
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:1143
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:1148
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:1149
Similar to Sys_var_session_special, but with double storage.
Definition: sys_vars.h:2037
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:2071
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:2068
session_special_read_double_function read_func
Definition: sys_vars.h:2041
double(* session_special_read_double_function)(THD *thd)
Definition: sys_vars.h:2039
session_special_update_function update_func
Definition: sys_vars.h:2042
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2072
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:2045
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:2064
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:2061
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:2075
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2080
bool(* session_special_update_function)(THD *thd, set_var *var)
Definition: sys_vars.h:2038
The class for variables that have a special meaning for a session, such as @timestamp or @rnd_seed1,...
Definition: sys_vars.h:1984
bool global_update(THD *, set_var *) override
Definition: sys_vars.h:2012
bool(* session_special_update_function)(THD *thd, set_var *var)
Definition: sys_vars.h:1985
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:2009
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:2016
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2028
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:1992
void global_save_default(THD *, set_var *) override
save the global default value of the variable in var
Definition: sys_vars.h:2019
ulonglong(* session_special_read_function)(THD *thd)
Definition: sys_vars.h:1986
session_special_read_function read_func
Definition: sys_vars.h:1988
session_special_update_function update_func
Definition: sys_vars.h:1989
void saved_value_to_string(THD *, set_var *, char *) override
This function converts value stored in save_result to string.
Definition: sys_vars.h:2020
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:2023
The class for SET variables - variables taking zero or more values from the given list.
Definition: sys_vars.h:1621
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:1678
bool do_check(THD *, set_var *var) override
Definition: sys_vars.h:1641
const uchar * global_value_ptr(THD *thd, std::string_view) override
Definition: sys_vars.h:1703
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:1623
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:1686
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:1689
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:1692
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:1682
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:1697
Generic class for variables for storing entities that are internally represented as structures,...
Definition: sys_vars.h:2195
bool check_update_type(Item_result type) override
Definition: sys_vars.h:2243
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:2237
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:2246
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:2222
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:2233
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:2197
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:2226
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2251
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:2230
bool do_check(THD *, set_var *) override
Definition: sys_vars.h:2221
Class for @global.system_time_zone.
Definition: sys_vars.h:2611
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2618
Sys_var_system_time_zone(const char *name_arg, const char *comment_arg)
Definition: sys_vars.h:2613
The class for test_flags (core_file for now).
Definition: sys_vars.h:1454
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:1466
bool test_flag_value
Definition: sys_vars.h:1456
uint test_flag_mask
Definition: sys_vars.h:1457
Sys_var_test_flag(const char *name_arg, const char *comment, uint mask)
Definition: sys_vars.h:1460
Class representing the 'transaction_isolation' system variable.
Definition: sys_vars.h:2344
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:5188
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:2346
Class representing the tx_read_only system variable for setting default transaction access mode.
Definition: sys_vars.h:2366
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:5257
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:2368
Helper class for variables that take values from a TYPELIB.
Definition: sys_vars.h:567
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:572
bool do_check(THD *, set_var *var) override
Definition: sys_vars.h:590
TYPELIB typelib
Definition: sys_vars.h:569
bool check_update_type(Item_result type) override
Definition: sys_vars.h:613
The class for variables that store time zones.
Definition: sys_vars.h:2267
bool do_check(THD *thd, set_var *var) override
Definition: sys_vars.h:2284
bool session_update(THD *thd, set_var *var) override
Definition: sys_vars.h:2298
void global_save_default(THD *, set_var *var) override
save the global default value of the variable in var
Definition: sys_vars.h:2309
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:2269
bool check_update_type(Item_result type) override
Definition: sys_vars.h:2333
bool global_update(THD *, set_var *var) override
Definition: sys_vars.h:2302
void session_save_default(THD *, set_var *var) override
save the session default value of the variable in var
Definition: sys_vars.h:2306
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:2315
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:2312
const uchar * global_value_ptr(THD *, std::string_view) override
Definition: sys_vars.h:2329
Definition: sys_vars.h:1100
~Sys_var_version() override=default
const uchar * global_value_ptr(THD *thd, std::string_view keycache_name) override
Definition: sys_vars.h:1110
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:1102
std::string_view get_keycache_name() const
Definition: set_var.h:678
bool is_keycache_var() const
Definition: set_var.h:655
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
Gtid owned_gtid
The GTID of the currently owned transaction.
Definition: sql_class.h:3698
static const int OWNED_SIDNO_GTID_SET
Definition: sql_class.h:3699
rpl_sid owned_sid
For convenience, this contains the SID component of the GTID stored in owned_gtid.
Definition: sql_class.h:3706
union THD::@167 sys_var_tmp
double double_value
Definition: sql_class.h:2744
static const int OWNED_SIDNO_ANONYMOUS
Definition: sql_class.h:3700
Session_sysvar_resource_manager session_sysvar_res_mgr
Definition: sql_class.h:4378
void * alloc(size_t size)
Definition: sql_lexer_thd.h:48
bool bool_value
Definition: sql_class.h:2740
System_variables variables
Definition: sql_lexer_thd.h:62
char * strmake(const char *str, size_t size) const
Definition: sql_lexer_thd.h:50
Security_context * security_context() const
Definition: sql_class.h:1285
bool time_zone_used
Definition: sql_class.h:2706
ulonglong ulonglong_value
Definition: sql_class.h:2743
const USER_CONN * get_user_connect() const
Definition: sql_class.h:2355
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:971
ulonglong ulonglong_value
for all integer, set, enum sysvars
Definition: set_var.h:977
const enum_var_type type
Definition: set_var.h:974
const System_variable_tracker m_var_tracker
Definition: set_var.h:986
Time_zone * time_zone
for Sys_var_tz
Definition: set_var.h:980
union set_var::@161 save_result
Resolver of the variable at the left hand side of the assignment.
Item * value
the expression that provides the new value of the variable
Definition: set_var.h:973
LEX_STRING string_value
for Sys_var_charptr and others
Definition: set_var.h:981
plugin_ref plugin
for Sys_var_plugin
Definition: set_var.h:979
const void * ptr
for Sys_var_struct
Definition: set_var.h:982
double double_value
for Sys_var_double
Definition: set_var.h:978
Definition: sql_plugin_var.h:196
A class representing one system variable - that is something that can be accessed as @global....
Definition: set_var.h:105
virtual bool global_update(THD *thd, set_var *var)=0
virtual bool set_source_name(const char *path)
Definition: set_var.h:238
my_option option
min, max, default values are stored here
Definition: set_var.h:173
my_option * get_option()
Definition: set_var.h:252
bool(* on_update_function)(sys_var *self, THD *thd, enum_var_type type)
Definition: set_var.h:167
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:108
virtual void set_arg_source(get_opt_arg_source *)
Definition: set_var.h:231
virtual const char * get_host()
Definition: set_var.h:246
virtual ulonglong get_max_value()
Definition: set_var.h:224
virtual void set_user_host(THD *thd)
Definition: set_var.cc:454
uchar * global_var_ptr()
Definition: set_var.cc:401
enum sys_var::binlog_status_enum binlog_status
uchar * session_var_ptr(THD *thd)
A pointer to a storage area of the variable, to the raw data.
Definition: set_var.cc:397
flag_enum
Definition: set_var.h:126
@ SESSION
Definition: set_var.h:128
@ GLOBAL
Definition: set_var.h:127
@ READONLY
Definition: set_var.h:131
@ ALLOCATED
Definition: set_var.h:132
@ NOTPERSIST
Definition: set_var.h:135
@ PERSIST_AS_READ_ONLY
There can be some variables which needs to be set before plugin is loaded.
Definition: set_var.h:146
@ ONLY_SESSION
Definition: set_var.h:129
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:245
virtual void cleanup()
All the cleanup procedures should be performed here.
Definition: set_var.h:207
virtual longlong get_min_value()
Definition: set_var.h:223
virtual void set_is_plugin(bool)
Definition: set_var.h:232
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:159
@ VARIABLE_NOT_IN_BINLOG
Definition: set_var.h:160
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:184
ptrdiff_t offset
offset to the value from global_system_variables
Definition: set_var.h:175
virtual bool set_user(const char *usr)
Definition: set_var.h:242
bool(* on_check_function)(sys_var *self, THD *thd, set_var *var)
Definition: set_var.h:165
virtual enum_variable_source get_source()
Definition: set_var.h:233
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:393
on_check_function on_check
Definition: set_var.h:176
const CHARSET_INFO * charset(THD *thd)
Definition: set_var.cc:589
virtual ulong get_var_type()
Returns variable type.
Definition: set_var.h:230
virtual const char * get_source_name()
Definition: set_var.h:234
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:181
int scope() const
Definition: set_var.h:273
virtual void set_timestamp()
Definition: set_var.h:253
const SHOW_TYPE show_val_type
what value_ptr() returns for sql_show.cc
Definition: set_var.h:172
on_update_function on_update
Definition: set_var.h:182
int flags
or'ed flag_enum values
Definition: set_var.h:170
static const int PARSE_NORMAL
Definition: set_var.h:154
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:388
virtual void update_default(longlong new_def_value)
Definition: set_var.h:219
virtual bool set_host(const char *hst)
Definition: set_var.h:247
PolyLock * guard
second lock that protects the variable
Definition: set_var.h:174
virtual longlong get_default()
Definition: set_var.h:222
virtual bool is_non_persistent()
Definition: set_var.h:255
virtual sys_var_pluginvar * cast_pluginvar()
downcast for sys_var_pluginvar.
Definition: set_var.h:212
const char *const deprecation_substitute
Definition: set_var.h:183
virtual ulonglong get_timestamp() const
Definition: set_var.h:250
bool(* pre_update_function)(sys_var *self, THD *thd, set_var *var)
Definition: set_var.h:166
bool is_readonly() const
Definition: set_var.h:275
virtual bool session_update(THD *thd, set_var *var)=0
int m_parse_flag
either PARSE_EARLY or PARSE_NORMAL.
Definition: set_var.h:171
virtual void set_source(enum_variable_source src)
Definition: set_var.h:235
Declarations for the Debug Sync Facility.
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
#define base_name(A)
Definition: my_sys.h:706
void my_error(int nr, myf MyFlags,...)
Fill in and print a previously registered error message.
Definition: my_error.cc:216
#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:119
#define MYSQL_STORAGE_ENGINE_PLUGIN
Definition: plugin.h:114
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.
MYSQL_PLUGIN_IMPORT CHARSET_INFO * system_charset_info
Definition: mysqld.cc:1545
#define my_strcasecmp(s, a, b)
Definition: m_ctype.h:718
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1
Definition: ctype-latin1.cc:368
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:101
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:203
static mi_bit_type mask[]
Definition: mi_packrec.cc:141
This file includes constants used by all storage engines.
Some useful bit functions.
static uint my_count_bits(ulonglong v)
Definition: my_bit.h:54
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:1258
#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
double getopt_double_limit_value(double num, const struct my_option *optp, bool *fix)
Definition: my_getopt.cc:1298
double getopt_ulonglong2double(ulonglong)
Returns the double value which corresponds to the given raw representation.
Definition: my_getopt.cc:168
ulonglong max_of_int_range(int var_type)
Maximum possible value for an integer GET_* variable type.
Definition: my_getopt.cc:1160
#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:1187
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.
Sid_map * global_sid_map
Definition: mysqld.cc:1833
uint test_flags
Definition: mysqld.cc:1323
const char * show_comp_option_name[]
Definition: mysqld.cc:1029
char system_time_zone_dst_off[30]
Definition: mysqld.cc:1475
bool opt_bin_log
Definition: mysqld.cc:1179
Gtid_state * gtid_state
Global state of GTIDs.
Definition: mysqld.cc:1834
Checkable_rwlock * global_sid_lock
Protects Gtid_state. See comment above gtid_state for details.
Definition: mysqld.cc:1832
struct System_variables max_system_variables
Definition: mysqld.cc:1540
char system_time_zone_dst_on[30]
Definition: mysqld.cc:1475
static char * path
Definition: mysqldump.cc:137
arg_type
Definition: mysqltest.cc:1142
int find_set(REP_SETS *sets, REP_SET *find)
Definition: mysqltest.cc:11205
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1052
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:910
Provides atomic access in shared-exclusive modes.
Definition: shared_spin_lock.h:79
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
ulonglong getopt_double2ulonglong(double v)
Returns an ulonglong value containing a raw representation of the given double value.
Definition: my_getopt.cc:157
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:550
"public" interface to sys_var - server configuration variables.
enum enum_mysql_show_type SHOW_TYPE
Definition: set_var.h:73
@ OPT_GLOBAL
Definition: set_var.h:93
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:402
File containing constants that can be used throughout the server.
SHOW_COMP_OPTION
Definition: sql_const.h:228
constexpr const size_t STRING_BUFFER_USUAL_SIZE
Definition: sql_const.h:125
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:685
void plugin_unlock(THD *thd, plugin_ref plugin)
Definition: sql_plugin.cc:1254
#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:1125
@ 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:174
int id
Definition: sys_vars.h:175
CMD_LINE(enum get_opt_arg_type getopt_arg_type, int getopt_id=0)
Definition: sys_vars.h:177
enum get_opt_arg_type arg_type
Definition: sys_vars.h:176
Holds information about a Gtid_set.
Definition: rpl_gtid.h:2370
Gtid_set * get_gtid_set() const
Return NULL if this is NULL, otherwise return the Gtid_set.
Definition: rpl_gtid.h:2376
This struct represents a specification of a GTID for a statement to be executed: either "AUTOMATIC",...
Definition: rpl_gtid.h:3791
static const int MAX_TEXT_LENGTH
Definition: rpl_gtid.h:3842
static const int MAX_TEXT_LENGTH
The maximal length of the textual representation of a SID, not including the terminating '\0'.
Definition: rpl_gtid.h:1101
rpl_sidno sidno
SIDNO of this Gtid.
Definition: rpl_gtid.h:1068
int to_string(const rpl_sid &sid, char *buf) const
Convert a Gtid to a string.
Definition: rpl_gtid_misc.cc:118
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:750
uint number
Definition: sys_vars.h:752
const char * alias
Definition: sys_vars.h:751
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:95
uint user_conn
Definition: sql_connect.h:52
#define NO_CMD_LINE
Definition: sys_vars.h:127
Sys_var_integer< ulong, GET_ULONG, SHOW_LONG, false > Sys_var_ulong
Definition: sys_vars.h:337
#define keycache_var_ptr(KC, OFF)
Definition: sys_vars.h:1294
#define keycache_var(KC, OFF)
Definition: sys_vars.h:1295
charset_enum
Definition: sys_vars.h:163
@ IN_SYSTEM_CHARSET
Definition: sys_vars.h:163
@ IN_FS_CHARSET
Definition: sys_vars.h:163
#define NON_PERSIST
Definition: sys_vars.h:145
#define MAX_SET(X)
Definition: sys_vars.h:1505
Sys_var_integer< uint, GET_UINT, SHOW_INT, false > Sys_var_uint
Definition: sys_vars.h:336
sys_var_chain all_sys_vars
Definition: set_var.cc:138
Sys_var_integer< int32, GET_UINT, SHOW_INT, false > Sys_var_int32
Definition: sys_vars.h:335
constexpr const unsigned long MAX_CONNECTIONS_DEFAULT
Maximum number of connections default value.
Definition: sys_vars.h:109
void update_parser_max_mem_size()
Definition: sys_vars.cc:3385
const char * fixup_enforce_gtid_consistency_command_line(char *value_arg)
Definition: sys_vars.cc:6551
#define session_var(THD, TYPE)
Definition: sys_vars.h:156
Sys_var_integer< long, GET_LONG, SHOW_SIGNED_LONG, true > Sys_var_long
Definition: sys_vars.h:342
constexpr const unsigned long TABLE_DEF_CACHE_DEFAULT
Definition: sys_vars.h:103
#define GLOBAL_VAR(X)
Definition: sys_vars.h:118
bool(* keycache_update_function)(THD *, KEY_CACHE *, ptrdiff_t, ulonglong)
Definition: sys_vars.h:1296
void update_optimizer_switch()
Definition: sys_vars.cc:3395
static const char * bool_values[3]
Definition: sys_vars.h:165
constexpr const unsigned long TABLE_OPEN_CACHE_DEFAULT
Definition: sys_vars.h:102
#define global_var(TYPE)
Definition: sys_vars.h:157
Sys_var_integer< ha_rows, GET_HA_ROWS, SHOW_HA_ROWS, false > Sys_var_harows
Definition: sys_vars.h:339
Sys_var_integer< ulonglong, GET_ULL, SHOW_LONGLONG, false > Sys_var_ulonglong
Definition: sys_vars.h:341
"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)
Search after a string in a list of strings.
Definition: typelib.cc:87
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)
Parse and apply a set of flag assingments.
Definition: typelib.cc:298
#define NULL
Definition: types.h:55
Time_zone * my_tz_find(const int64 displacement)
unsigned int uint
Definition: uca9-dump.cc:75
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