From 7a154d635ec4bbb5f4a88daf9e5735d441f1e9b1 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Tue, 8 Apr 2008 21:43:05 +0000 Subject: [PATCH] Fixed an issue with table_cache in MySQL 6.x (it's now table_open_cache in MySQL 6.x) --- mysqltuner.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index c8b7022..300dba9 100644 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -658,7 +658,11 @@ sub mysql_stats { if ($mystat{'Open_tables'} > 0) { if ($mycalc{'table_cache_hit_rate'} < 20) { badprint "Table cache hit rate: $mycalc{'table_cache_hit_rate'}%\n"; - push(@adjvars,"table_cache (> ".$myvar{'table_cache'}.")"); + if ($mysqlvermajor eq 6) { + push(@adjvars,"table_cache (> ".$myvar{'table_open_cache'}.")"); + } else { + push(@adjvars,"table_cache (> ".$myvar{'table_cache'}.")"); + } push(@generalrec,"Increase table_cache gradually to avoid file descriptor limits"); } else { goodprint "Table cache hit rate: $mycalc{'table_cache_hit_rate'}%\n";