24#ifndef COMPONENT_SYS_VAR_SERVICE_H
25#define COMPONENT_SYS_VAR_SERVICE_H
47#define MYSQL_THD THD *
107 void *val_ptr,
const void *save);
109#define COPY_MYSQL_PLUGIN_VAR_HEADER(sys_var_type, type, sys_var_check, \
111 sys_var_type->flags = flags; \
112 sys_var_type->name = var_name; \
113 sys_var_type->comment = comment; \
114 sys_var_type->check = check_func ? check_func : sys_var_check; \
115 sys_var_type->update = update_func ? update_func : sys_var_update; \
116 sys_var_type->value = (type *)variable_value;
118#define COPY_MYSQL_PLUGIN_VAR_REMAINING(sys_var_type, check_arg_type) \
119 sys_var_type->def_val = check_arg_type->def_val; \
120 sys_var_type->min_val = check_arg_type->min_val; \
121 sys_var_type->max_val = check_arg_type->max_val; \
122 sys_var_type->blk_sz = check_arg_type->blk_sz;
124#define SYSVAR_INTEGRAL_TYPE(type) \
125 struct sysvar_##type##_type { \
126 MYSQL_PLUGIN_VAR_HEADER; \
134#define SYSVAR_ENUM_TYPE(type) \
135 struct sysvar_##type##_type { \
136 MYSQL_PLUGIN_VAR_HEADER; \
137 unsigned long *value; \
138 unsigned long def_val; \
142#define SYSVAR_BOOL_TYPE(type) \
143 struct sysvar_##type##_type { \
144 MYSQL_PLUGIN_VAR_HEADER; \
149#define SYSVAR_STR_TYPE(type) \
150 struct sysvar_##type##_type { \
151 MYSQL_PLUGIN_VAR_HEADER; \
180#define INTEGRAL_CHECK_ARG(type) \
181 struct type##_check_arg_s { \
194#define ENUM_CHECK_ARG(type) \
195 struct type##_check_arg_s { \
196 unsigned long def_val; \
206#define BOOL_CHECK_ARG(type) \
207 struct type##_check_arg_s { \
217#define STR_CHECK_ARG(type) \
218 struct type##_check_arg_s { \
321 (
const char *component_name,
const char *
name,
int flags,
324 void *variable_value));
367 void **val,
size_t *out_length_of_val));
383 (const
char *component_name, const
char *
name));
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
#define MYSQL_THD
Definition: component_sys_var_service.h:47
int(* mysql_sys_var_check_func)(MYSQL_THD thd, SYS_VAR *var, void *save, struct st_mysql_value *value)
Signature for the check function.
Definition: component_sys_var_service.h:78
void(* mysql_sys_var_update_func)(MYSQL_THD thd, SYS_VAR *var, void *val_ptr, const void *save)
Signature for the update function.
Definition: component_sys_var_service.h:106
static int flags[50]
Definition: hp_test1.cc:40
static user_var_entry * get_variable(THD *thd, const Name_string &name, const CHARSET_INFO *cs)
Get variable with given name; conditionally create it if non-existing.
Definition: item_func.cc:5965
#define comment
Definition: lexyy.cc:959
static uint update
Definition: myisamlog.cc:94
static mysql_service_status_t register_variable(const char *, const char *, int, const char *, mysql_sys_var_check_func, mysql_sys_var_update_func, void *, void *) noexcept
Definition: component_sys_variable_all_empty.cc:37
static mysql_service_status_t unregister_variable(const char *, const char *) noexcept
Definition: component_sys_variable_all_empty.cc:48
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:91
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:86
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:112
case opt name
Definition: sslopt-case.h:29
A utility class for the ENUM variables.
Definition: component_sys_var_service.h:38
const char * name
Definition: component_sys_var_service.h:40
unsigned int * type_lengths
Definition: component_sys_var_service.h:42
size_t count
Definition: component_sys_var_service.h:39
const char ** type_names
Definition: component_sys_var_service.h:41
Definition: system_variables_bits.h:94