Merge pull request #318 from Red54/patch-1

The query cache should be disabled
This commit is contained in:
Jean-Marie Renouard 2017-04-20 16:05:53 +02:00 committed by GitHub
commit 36abf64b64

View file

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