mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03: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:
@ -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
|
||||
|
Reference in New Issue
Block a user