Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit ca9c278

Browse files
author
Brice Figureau
committed
Fix 'process list' fetching when state is not defined
1 parent a44ae84 commit ca9c278

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mysql-snmp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,10 +812,10 @@ sub fetch_mysql_data {
812812
foreach my $row (@$result) {
813813
my %newrow = map {lc($_) => $row->{$_}} keys %$row;
814814
my $state = $newrow{'State'};
815-
if ( defined($state) ) {
815+
if ( !defined($state) ) {
816816
$state = 'NULL';
817817
}
818-
if ( $state == '' ) {
818+
if ( $state eq '' ) {
819819
$state = 'none';
820820
}
821821
$state = lc($state);

0 commit comments

Comments
 (0)