summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authorunknown <timour@mysql.com>2005-01-19 12:55:54 +0200
committerunknown <timour@mysql.com>2005-01-19 12:55:54 +0200
commit8e1e1e73d811d4090255b49128ffa697163b2e1d (patch)
tree75bcf07f1651331afc8970e24f80afa45a0bdead /sql/set_var.cc
parent49ab428c8ddc0cbafb99cb10ee77167081a23914 (diff)
downloadmariadb-git-8e1e1e73d811d4090255b49128ffa697163b2e1d.tar.gz
Final patch for BUG#4285.
This patch collects all previous patches into one. The main problem was due to that there is are two variables - dflt_key_cache and sql_key_cache with have more or less duplicate function. The reson for the bug was that the default value in the key cache hash was set to dflt_key_cache, then sql_key_cache was set to a new key cache object, and then dflt_key_cache was set to sql_key_cache which was different from the dflt_key_cache_var. After sending SIGHUP, the server was using the original default value for the key cache hash, which was different from the actual key cache object used for the default key cache. include/keycache.h: Import patch 4285.diff mysys/mf_keycache.c: Import patch 4285.diff sql/mysql_priv.h: Import patch 4285.diff sql/mysqld.cc: Import patch 4285.diff sql/set_var.cc: Import patch 4285.diff sql/sql_parse.cc: Import patch 4285.diff sql/sql_show.cc: Import patch 4285.diff
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index e44ac742abe..1237c31075c 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -2174,7 +2174,7 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var)
if (!tmp) // Zero size means delete
{
- if (key_cache == sql_key_cache)
+ if (key_cache == dflt_key_cache)
goto end; // Ignore default key cache
if (key_cache->key_cache_inited) // If initied
@@ -2188,7 +2188,7 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var)
base_name->length, &list);
key_cache->in_init= 1;
pthread_mutex_unlock(&LOCK_global_system_variables);
- error= reassign_keycache_tables(thd, key_cache, sql_key_cache);
+ error= reassign_keycache_tables(thd, key_cache, dflt_key_cache);
pthread_mutex_lock(&LOCK_global_system_variables);
key_cache->in_init= 0;
}