summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authoringo@mysql.com <>2005-08-07 20:39:17 +0200
committeringo@mysql.com <>2005-08-07 20:39:17 +0200
commit1147e0027424acfed7cd833d0edbd6f111208f8a (patch)
tree4ef9625701d08f60d64213e805dad252b10b53ee /sql/set_var.cc
parentb76cea46e936376a33bdb5c8c001bac649585e29 (diff)
downloadmariadb-git-1147e0027424acfed7cd833d0edbd6f111208f8a.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.
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc5
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
{