From 80def039234b042dd5781e8ca4c3ddd7251e1644 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 18 Apr 2016 11:07:05 +0200 Subject: [PATCH] #187 enforce control over P_S activation --- mysqltuner.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index c174c00..1aee004 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -2967,9 +2967,11 @@ sub mariadb_threadpool { sub get_pf_memory { # Performance Schema - return 0 unless ( defined( $myvar{'performance_schema'} ) and $myvar{'performance_schema'} eq 'ON' ); - + return 0 unless defined $myvar{'performance_schema'}; + return 0 if $myvar{'performance_schema'} eq 'OFF'; + my @infoPFSMemory=grep /performance_schema.memory/, select_array("SHOW ENGINE PERFORMANCE_SCHEMA STATUS"); + return 0 if scalar(@infoPFSMemory)==0; $infoPFSMemory[0] =~ s/.*\s+(\d+)$/$1/g; return $infoPFSMemory[0]; }