diff options
author | unknown <bell@sanja.is.com.ua> | 2002-07-28 22:36:34 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2002-07-28 22:36:34 +0300 |
commit | 5c8124bd43dd889e843ff1a90e9b109c28e4c8ef (patch) | |
tree | d5f672e9fa2a3a2ae3ee1c02bb87f967b58b5ec0 /sql | |
parent | 0e43c43636dde1e80e0b881317420609ba5faa8a (diff) | |
download | mariadb-git-5c8124bd43dd889e843ff1a90e9b109c28e4c8ef.tar.gz |
fixed query cahe resize bug
mysql-test/r/query_cache.result:
query cache resize bug test
mysql-test/t/query_cache.test:
query cache resize bug test
sql/set_var.cc:
typo fixed
sql/sql_cache.cc:
prevent of using very small (unusable) cache size, that cause problem in memory allocation system (query cache resize bug)
Diffstat (limited to 'sql')
-rw-r--r-- | sql/set_var.cc | 2 | ||||
-rw-r--r-- | sql/sql_cache.cc | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index ec8a9e83ed3..a9882af546a 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -467,7 +467,7 @@ struct show_var_st init_vars[]= { {sys_read_buff_size.name, (char*) &sys_read_buff_size, SHOW_SYS}, {sys_read_rnd_buff_size.name,(char*) &sys_read_rnd_buff_size, SHOW_SYS}, {sys_rpl_recovery_rank.name,(char*) &sys_rpl_recovery_rank, SHOW_SYS}, -#ifdef HAVE_QUERTY_CACHE +#ifdef HAVE_QUERY_CACHE {sys_query_cache_limit.name,(char*) &sys_query_cache_limit, SHOW_SYS}, {sys_query_cache_size.name, (char*) &sys_query_cache_size, SHOW_SYS}, {sys_query_cache_type.name, (char*) &sys_query_cache_type, SHOW_SYS}, diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index cba9f17359a..7b5e1bf4e59 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1276,10 +1276,11 @@ ulong Query_cache::init_cache() query_cache_size -= additional_data_size; STRUCT_LOCK(&structure_guard_mutex); - if (query_cache_size <= min_allocation_unit) + if (max_mem_bin_size <= min_allocation_unit) { DBUG_PRINT("qcache", - (" query_cache_size <= min_allocation_unit => cache disabled")); + (" max bin size (%lu) <= min_allocation_unit => cache disabled", + max_mem_bin_size)); STRUCT_UNLOCK(&structure_guard_mutex); goto err; } |