Disable query cache.

This commit is contained in:
謝致邦 (XIE Zhibang) 2017-04-19 21:25:45 +08:00 committed by GitHub
parent 2f3832b6f7
commit f4a108c2f6

View file

@ -2799,20 +2799,12 @@ sub mysql_stats {
push( @generalrec,
"Upgrade MySQL to version 4+ to utilize query caching" );
}
elsif ( mysql_version_ge( 5, 5 )
elsif ( $myvar{'query_cache_size'} < 1
and $myvar{'query_cache_type'} eq "OFF" )
{
goodprint
"Query cache is disabled by default due to mutex contention on multiprocessor machines.";
}
elsif ( $myvar{'query_cache_size'} < 1 ) {
badprint "Query cache is disabled";
push( @adjvars, "query_cache_size (>= 8M)" );
}
elsif ( $myvar{'query_cache_type'} eq "OFF" ) {
badprint "Query cache is disabled";
push( @adjvars, "query_cache_type (=1)" );
}
elsif ( $mystat{'Com_select'} == 0 ) {
badprint
"Query cache cannot be analyzed - no SELECT statements executed";
@ -2820,6 +2812,7 @@ sub mysql_stats {
else {
badprint
"Query cache may be disabled by default due to mutex contention.";
push( @adjvars, "query_cache_size (=0)" );
push( @adjvars, "query_cache_type (=0)" );
if ( $mycalc{'query_cache_efficiency'} < 20 ) {
badprint