mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
Bug#43233: Some server variables are clipped during "update," not "check" stage
Bug#55794: ulonglong options of mysqld show wrong values. Port the few remaining system variables to the correct mechanism -- range-check in check-stage (and throw error or warning at that point as needed and depending on STRICTness), update in update stage. Fix some signedness errors when retrieving sysvar values for display. mysql-test/r/variables.result: Show that we throw warnings or errors depending on strictness even for "special" variables now. mysql-test/t/variables.test: Show that we throw warnings or errors depending on strictness even for "special" variables now. sql/item_func.cc: show sys_var_ulonglong_ptr and SHOW_LONGLONG type variables as unsigned. sql/set_var.cc: move range-checking from update stage to check stage for the remaining few sys-vars that broke the pattern sql/set_var.h: add check functions.
This commit is contained in:
parent
58dfba2899
commit
c4fa6a3862
5 changed files with 121 additions and 19 deletions
|
|
@ -196,6 +196,7 @@ public:
|
|||
sys_after_update_func func)
|
||||
:sys_var(name_arg,func), 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_LONGLONG; }
|
||||
|
|
@ -442,6 +443,7 @@ public:
|
|||
sys_after_update_func func)
|
||||
:sys_var_thd(name_arg,func), offset(offset_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_HA_ROWS; }
|
||||
|
|
@ -854,6 +856,7 @@ public:
|
|||
:sys_var_key_cache_param(chain, name_arg,
|
||||
offsetof(KEY_CACHE, param_buff_size))
|
||||
{}
|
||||
bool check(THD *thd, set_var *var);
|
||||
bool update(THD *thd, set_var *var);
|
||||
SHOW_TYPE show_type() { return SHOW_LONGLONG; }
|
||||
};
|
||||
|
|
@ -865,6 +868,7 @@ public:
|
|||
sys_var_key_cache_long(sys_var_chain *chain, const char *name_arg, size_t offset_arg)
|
||||
:sys_var_key_cache_param(chain, name_arg, offset_arg)
|
||||
{}
|
||||
bool check(THD *thd, set_var *var);
|
||||
bool update(THD *thd, set_var *var);
|
||||
SHOW_TYPE show_type() { return SHOW_LONG; }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue