diff --git a/mysqltuner.pl b/mysqltuner.pl index e0839b6..0703990 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -3881,9 +3881,9 @@ sub get_pf_memory { return 0 unless defined $myvar{'performance_schema'}; return 0 if $myvar{'performance_schema'} eq 'OFF'; - my @infoPFSMemory = grep /performance_schema.memory/, + my @infoPFSMemory = grep { /\tperformance_schema[.]memory\t/msx } select_array("SHOW ENGINE PERFORMANCE_SCHEMA STATUS"); - return 0 if scalar(@infoPFSMemory) == 0; + @infoPFSMemory == 1 || return 0; $infoPFSMemory[0] =~ s/.*\s+(\d+)$/$1/g; return $infoPFSMemory[0]; }