summaryrefslogtreecommitdiff
path: root/mysql-test/t/variables.test
diff options
context:
space:
mode:
authorTatiana A. Nurnberg <azundris@mysql.com>2010-11-25 03:50:16 +0000
committerTatiana A. Nurnberg <azundris@mysql.com>2010-11-25 03:50:16 +0000
commitc24ec469862efd232a7e4868092ff4a4b631ac62 (patch)
treec4dd23f6b4dc06870068ee555a2510dfca2b43a1 /mysql-test/t/variables.test
parent7bf81b15c61ac9c81c5cb59629aeba9ffe97006e (diff)
parent7336ac45b77bb8f794de3c37d6aa4864c02c6c57 (diff)
downloadmariadb-git-c24ec469862efd232a7e4868092ff4a4b631ac62.tar.gz
merge some docs changes and a test case; null merge the code.
(we don't need to port the actual code from 5.1; 5.5+ do the relevant things differently, but correctly. the test obviously is so it stays that way.) mysql-test/r/variables.result: add test case. mysql-test/t/variables.test: add test case. strings/CHARSET_INFO.txt: clarify documentation
Diffstat (limited to 'mysql-test/t/variables.test')
-rw-r--r--mysql-test/t/variables.test44
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 75099523062..d31939ed3dd 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -1243,6 +1243,50 @@ 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_WARN_CANT_DROP_DEFAULT_KEYCACHE
+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;
+# this is an exception. since this is a new error/warning, let's stay
+# compatible with the upcoming 5.6.
+--error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE
+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
###########################################################################