24#ifndef COMPONENT_SYS_VAR_SERVICE_H
25#define COMPONENT_SYS_VAR_SERVICE_H
46#define MYSQL_THD THD *
106 void *val_ptr,
const void *save);
108#define COPY_MYSQL_PLUGIN_VAR_HEADER(sys_var_type, type, sys_var_check, \
110 sys_var_type->flags = flags; \
111 sys_var_type->name = var_name; \
112 sys_var_type->comment = comment; \
113 sys_var_type->check = check_func ? check_func : sys_var_check; \
114 sys_var_type->update = update_func ? update_func : sys_var_update; \
115 sys_var_type->value = (type *)variable_value;
117#define COPY_MYSQL_PLUGIN_VAR_REMAINING(sys_var_type, check_arg_type) \
118 sys_var_type->def_val = check_arg_type->def_val; \
119 sys_var_type->min_val = check_arg_type->min_val; \
120 sys_var_type->max_val = check_arg_type->max_val; \
121 sys_var_type->blk_sz = check_arg_type->blk_sz;
123#define SYSVAR_INTEGRAL_TYPE(type) \
124 struct sysvar_##type##_type { \
125 MYSQL_PLUGIN_VAR_HEADER; \
133#define SYSVAR_ENUM_TYPE(type) \
134 struct sysvar_##type##_type { \
135 MYSQL_PLUGIN_VAR_HEADER; \
136 unsigned long *value; \
137 unsigned long def_val; \
141#define SYSVAR_BOOL_TYPE(type) \
142 struct sysvar_##type##_type { \
143 MYSQL_PLUGIN_VAR_HEADER; \
148#define SYSVAR_STR_TYPE(type) \
149 struct sysvar_##type##_type { \
150 MYSQL_PLUGIN_VAR_HEADER; \
179#define INTEGRAL_CHECK_ARG(type) \
180 struct type##_check_arg_s { \
193#define ENUM_CHECK_ARG(type) \
194 struct type##_check_arg_s { \
195 unsigned long def_val; \
205#define BOOL_CHECK_ARG(type) \
206 struct type##_check_arg_s { \
216#define STR_CHECK_ARG(type) \
217 struct type##_check_arg_s { \
320 (
const char *component_name,
const char *
name,
int flags,
323 void *variable_value));
366 void **val,
size_t *out_length_of_val));
382 (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:34
#define MYSQL_THD
Definition: component_sys_var_service.h:46
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:77
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:105
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:5844
#define comment
Definition: lexyy.cc:959
static uint update
Definition: myisamlog.cc:91
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:33
A utility class for the ENUM variables.
Definition: component_sys_var_service.h:37
const char * name
Definition: component_sys_var_service.h:39
unsigned int * type_lengths
Definition: component_sys_var_service.h:41
size_t count
Definition: component_sys_var_service.h:38
const char ** type_names
Definition: component_sys_var_service.h:40
Definition: system_variables_bits.h:94