diff options
author | Tatiana A. Nurnberg <azundris@mysql.com> | 2010-11-11 11:35:48 +0000 |
---|---|---|
committer | Tatiana A. Nurnberg <azundris@mysql.com> | 2010-11-11 11:35:48 +0000 |
commit | c4fa6a3862dbb8009effc89997701e01de705411 (patch) | |
tree | 87291f8d65b97f1b61381de7b1d99f1fc33fb26f /sql/set_var.h | |
parent | 58dfba2899474553592479be24ef73947775eeaf (diff) | |
download | mariadb-git-c4fa6a3862dbb8009effc89997701e01de705411.tar.gz |
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.
Diffstat (limited to 'sql/set_var.h')
-rw-r--r-- | sql/set_var.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index 68cd94a5670..f2d2e5d2693 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -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; } }; |