fix(sql): mode collection - handle empty sql requests (#3287)

This commit is contained in:
qgarnier 2021-12-02 09:04:59 +01:00 committed by GitHub
parent 3a89dc62e7
commit 140fa3ec50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

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