Merge pull request #618 from lewart3/get_pf_memory

Fix #616 get_pf_memory() returns bogus value
This commit is contained in:
Jean-Marie Renouard 2022-11-01 14:22:55 +01:00 committed by GitHub
commit de2b2be92c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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];
}