diff options
author | unknown <ingo@mysql.com> | 2005-08-07 20:39:17 +0200 |
---|---|---|
committer | unknown <ingo@mysql.com> | 2005-08-07 20:39:17 +0200 |
commit | 9e5c20f31faa1488a0beb1c3f3ad509227d0dcf1 (patch) | |
tree | 4ef9625701d08f60d64213e805dad252b10b53ee /sql/set_var.cc | |
parent | 9cd28273aa1d65090fda2702d28a2300d62e653d (diff) | |
download | mariadb-git-9e5c20f31faa1488a0beb1c3f3ad509227d0dcf1.tar.gz |
Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
Give the user a warning if he tries to destroy the default key cache.
mysql-test/r/key_cache.result:
Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
The test result.
mysql-test/t/key_cache.test:
Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
The test case.
sql/share/errmsg.txt:
Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
The new message string.
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index ff37c46349d..637b33f18d2 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -2293,7 +2293,12 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var) if (!tmp) // Zero size means delete { if (key_cache == dflt_key_cache) + { + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_WARN_CANT_DROP_DEFAULT_KEYCACHE, + ER(ER_WARN_CANT_DROP_DEFAULT_KEYCACHE)); goto end; // Ignore default key cache + } if (key_cache->key_cache_inited) // If initied { |