23#ifndef COMPONENT_SYS_VAR_SERVICE_H
24#define COMPONENT_SYS_VAR_SERVICE_H
45#define MYSQL_THD THD *
105 void *val_ptr,
const void *save);
107#define COPY_MYSQL_PLUGIN_VAR_HEADER(sys_var_type, type, sys_var_check, \
109 sys_var_type->flags = flags; \
110 sys_var_type->name = var_name; \
111 sys_var_type->comment = comment; \
112 sys_var_type->check = check_func ? check_func : sys_var_check; \
113 sys_var_type->update = update_func ? update_func : sys_var_update; \
114 sys_var_type->value = (type *)variable_value;
116#define COPY_MYSQL_PLUGIN_VAR_REMAINING(sys_var_type, check_arg_type) \
117 sys_var_type->def_val = check_arg_type->def_val; \
118 sys_var_type->min_val = check_arg_type->min_val; \
119 sys_var_type->max_val = check_arg_type->max_val; \
120 sys_var_type->blk_sz = check_arg_type->blk_sz;
122#define SYSVAR_INTEGRAL_TYPE(type) \
123 struct sysvar_##type##_type { \
124 MYSQL_PLUGIN_VAR_HEADER; \
132#define SYSVAR_ENUM_TYPE(type) \
133 struct sysvar_##type##_type { \
134 MYSQL_PLUGIN_VAR_HEADER; \
135 unsigned long *value; \
136 unsigned long def_val; \
140#define SYSVAR_BOOL_TYPE(type) \
141 struct sysvar_##type##_type { \
142 MYSQL_PLUGIN_VAR_HEADER; \
147#define SYSVAR_STR_TYPE(type) \
148 struct sysvar_##type##_type { \
149 MYSQL_PLUGIN_VAR_HEADER; \
178#define INTEGRAL_CHECK_ARG(type) \
179 struct type##_check_arg_s { \
192#define ENUM_CHECK_ARG(type) \
193 struct type##_check_arg_s { \
194 unsigned long def_val; \
204#define BOOL_CHECK_ARG(type) \
205 struct type##_check_arg_s { \
215#define STR_CHECK_ARG(type) \
216 struct type##_check_arg_s { \
319 (
const char *component_name,
const char *
name,
int flags,
322 void *variable_value));
365 void **val,
size_t *out_length_of_val));
381 (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:33
#define MYSQL_THD
Definition: component_sys_var_service.h:45
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:76
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:104
static int flags[50]
Definition: hp_test1.cc:39
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:5829
#define comment
Definition: lexyy.cc:959
static uint update
Definition: myisamlog.cc:90
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:111
case opt name
Definition: sslopt-case.h:32
A utility class for the ENUM variables.
Definition: component_sys_var_service.h:36
const char * name
Definition: component_sys_var_service.h:38
unsigned int * type_lengths
Definition: component_sys_var_service.h:40
size_t count
Definition: component_sys_var_service.h:37
const char ** type_names
Definition: component_sys_var_service.h:39
Definition: system_variables_bits.h:93