summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-07-28 22:36:34 +0300
committerunknown <bell@sanja.is.com.ua>2002-07-28 22:36:34 +0300
commit5c8124bd43dd889e843ff1a90e9b109c28e4c8ef (patch)
treed5f672e9fa2a3a2ae3ee1c02bb87f967b58b5ec0 /sql/sql_cache.cc
parent0e43c43636dde1e80e0b881317420609ba5faa8a (diff)
downloadmariadb-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/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc5
1 files changed, 3 insertions, 2 deletions
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;
}