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 /mysql-test/t/variables.test | |
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 'mysql-test/t/variables.test')
-rw-r--r-- | mysql-test/t/variables.test | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index d5929041e8a..1b411d9420c 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -1255,4 +1255,45 @@ SET GLOBAL max_binlog_cache_size = @old_max_binlog_cache_size; SELECT @@skip_name_resolve; SHOW VARIABLES LIKE 'skip_name_resolve'; +--echo # +--echo # Bug #43233 : Some server variables are clipped during "update," +--echo # not "check" stage +--echo # + +SET @kbs=@@global.key_buffer_size; +SET @kcbs=@@global.key_cache_block_size; + +--echo throw errors in STRICT mode +SET SQL_MODE=STRICT_ALL_TABLES; + +# sys_var_ulonglong_ptr: sys_max_binlog_cache_size +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.max_binlog_cache_size=-1; + +# sys_var_thd_ha_rows: "max_join_size" et al. +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.max_join_size=0; + +# sys_var_key_buffer_size: "key_buffer_size" +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.key_buffer_size=0; + +# sys_var_key_cache_long: "key_cache_block_size" et al. +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.key_cache_block_size=0; + +--echo throw warnings in default mode +SET SQL_MODE=DEFAULT; + +SET @@global.max_binlog_cache_size=-1; +SET @@global.max_join_size=0; +SET @@global.key_buffer_size=0; +SET @@global.key_cache_block_size=0; + +# cleanup +SET @@global.max_binlog_cache_size=DEFAULT; +SET @@global.max_join_size=DEFAULT; +SET @@global.key_buffer_size=@kbs; +SET @@global.key_cache_block_size=@kcbs; + --echo End of 5.1 tests |