diff options
Diffstat (limited to 'sql/set_var.h')
-rw-r--r-- | sql/set_var.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index d52679550ab..a83de6425ae 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -1,3 +1,6 @@ +#ifndef SET_VAR_INCLUDED +#define SET_VAR_INCLUDED + /* Copyright (C) 2002-2006 MySQL AB This program is free software; you can redistribute it and/or modify @@ -172,6 +175,27 @@ public: { return (uchar*) value; } }; +/** + Unsigned int system variable class + */ +class sys_var_uint_ptr :public sys_var +{ +public: + sys_var_uint_ptr(sys_var_chain *chain, const char *name_arg, + uint *value_ptr_arg, + sys_after_update_func after_update_arg= NULL) + :sys_var(name_arg, after_update_arg), + value(value_ptr_arg) + { chain_sys_var(chain); } + bool check(THD *thd, set_var *var); + bool update(THD *thd, set_var *var); + void set_default(THD *thd, enum_var_type type); + SHOW_TYPE show_type() { return SHOW_INT; } + uchar *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) + { return (uchar*) value; } +private: + uint *value; +}; /* A global ulong variable that is protected by LOCK_global_system_variables @@ -1490,3 +1514,5 @@ void free_key_cache(const char *name, KEY_CACHE *key_cache); bool process_key_caches(process_key_cache_t func); void delete_elements(I_List<NAMED_LIST> *list, void (*free_element)(const char*, uchar*)); + +#endif /* SET_VAR_INCLUDED */ |