Correct table_cache_var bug

Fixes #49 by correcting a small error from #48. Sorry, folks!
This commit is contained in:
Major Hayden 2014-06-05 20:45:16 -05:00
parent e21c348345
commit 9341faf56a

View file

@ -908,13 +908,14 @@ sub mysql_stats {
}
# Table cache
my $table_cache_var = "";
if ($mystat{'Open_tables'} > 0) {
if ($mycalc{'table_cache_hit_rate'} < 20) {
badprint "Table cache hit rate: $mycalc{'table_cache_hit_rate'}% (".hr_num($mystat{'Open_tables'})." open / ".hr_num($mystat{'Opened_tables'})." opened)\n";
if (mysql_version_ge(5, 1)) {
my @table_cache_var = "table_open_cache";
$table_cache_var = "table_open_cache";
} else {
my @table_cache_var = "table_cache";
$table_cache_var = "table_cache";
}
push(@adjvars,$table_cache_var." (> ".$myvar{'table_open_cache'}.")");
push(@generalrec,"Increase ".$table_cache_var." gradually to avoid file descriptor limits");