summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2015-08-11 18:45:38 +0200
committerSergei Golubchik <serg@mariadb.org>2015-09-04 10:33:56 +0200
commite3982cead235e9becb1abdbf0e73876c8a6e6b28 (patch)
treee02c8ac4c2a978aa12f1f9fdf19ec5303f7e9341 /sql/sql_cache.cc
parent21daa7b9298d31ab1c6ddd1159dba29acea8d868 (diff)
downloadmariadb-git-e3982cead235e9becb1abdbf0e73876c8a6e6b28.tar.gz
MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be stopped with no-zero size)
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 2dd8976d51e..03505dec0cf 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -1295,14 +1295,6 @@ ulong Query_cache::resize(ulong query_cache_size_arg)
query_cache_size_arg));
DBUG_ASSERT(initialized);
- 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);
- }
-
lock_and_suspend();
/*
@@ -1340,7 +1332,7 @@ ulong Query_cache::resize(ulong query_cache_size_arg)
m_cache_status is internal query cache switch so switching it on/off
will not be reflected on global_system_variables.query_cache_type
*/
- if (new_query_cache_size)
+ if (new_query_cache_size && global_system_variables.query_cache_type != 0)
{
DBUG_EXECUTE("check_querycache",check_integrity(1););
m_cache_status= OK; // size > 0 => enable cache