summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-01-16 21:06:23 +0100
committerSergei Golubchik <sergii@pisem.net>2012-01-16 21:06:23 +0100
commit2ec0f46b88bc5f1d565d65025b7a868c6943ab0c (patch)
treede28d5051f89c5f6d6592d955b4e4f8498cecc44 /sql/sql_cache.cc
parentbaca1a40e98c4d1ac107118f5f4b6012f398bdf2 (diff)
downloadmariadb-git-2ec0f46b88bc5f1d565d65025b7a868c6943ab0c.tar.gz
query cache sysvar fixes
sql/share/errmsg-utf8.txt: correct the error message, as query_cache_type variable is not read-ony anymore sql/sql_cache.cc: the caller should verify that query cache resize is possible, before trying it sql/sys_vars.cc: * test if qc resize is possible in the sysvar on_check() funntion, not in the on_update() function. * use the error message that better describes the problem
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 7212f6996eb..0a1185a9924 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -1292,6 +1292,7 @@ ulong Query_cache::resize(ulong query_cache_size_arg)
if (global_system_variables.query_cache_type == 0)
{
+ DBUG_ASSERT(query_cache_size_arg == 0);
if (query_cache_size_arg != 0)
my_error(ER_QUERY_CACHE_IS_DISABLED, MYF(0));
DBUG_RETURN(0);