From 140fa3ec50372f88788d076bfd8ed5cf3c19ac4c Mon Sep 17 00:00:00 2001 From: qgarnier Date: Thu, 2 Dec 2021 09:04:59 +0100 Subject: [PATCH] fix(sql): mode collection - handle empty sql requests (#3287) --- centreon/common/protocols/sql/mode/collection.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/centreon/common/protocols/sql/mode/collection.pm b/centreon/common/protocols/sql/mode/collection.pm index 2f7a66908..36556d323 100644 --- a/centreon/common/protocols/sql/mode/collection.pm +++ b/centreon/common/protocols/sql/mode/collection.pm @@ -218,6 +218,7 @@ sub collect_sql_tables { $options{sql}->query(query => $table->{query}); $self->add_builtin(name => 'sqlExecutionTime.' . $table->{name}, value => tv_interval($timing0, [gettimeofday])); + $self->{sql_collected}->{tables}->{ $table->{name} } = {}; my $i = 0; while (my $entry = $options{sql}->fetchrow_hashref()) { my $instance = $i;