Skip to content

Commit 3ac95cd

Browse files
committed
query_cache off with query_cache_type=OFF OR query_cache_size=0
From the MySQL and MariaDB code (same - 5.5 version): https://github.com/mysql/mysql-server/blob/5.5/sql/sql_cache.h#L560 https://github.com/MariaDB/server/blob/5.5/sql/sql_cache.h#L572 This is used: https://github.com/mysql/mysql-server/blob/5.5/sql/sql_prepare.cc#L3058 (same in MariaDB code) The size=0 and type=0 are both sufficent conditions for the query cache to be disabled. As such lets consider it ok if its disabled only in one place. This is the case in mariadb where type=0 (OFF) is the default as is a non-zero query-cache size.
1 parent 9a9ff55 commit 3ac95cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mysqltuner.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2994,7 +2994,7 @@ sub mysql_stats {
29942994
#return;
29952995
}
29962996
elsif ( $myvar{'query_cache_size'} < 1
2997-
and $myvar{'query_cache_type'} eq "OFF" )
2997+
or $myvar{'query_cache_type'} eq "OFF" )
29982998
{
29992999
goodprint
30003000
"Query cache is disabled by default due to mutex contention on multiprocessor machines.";

0 commit comments

Comments
 (0)