Skip to content

Commit

Permalink
Fix fetching tmpTables vs tmpDiskTables from performance_schema (#853)
Browse files Browse the repository at this point in the history
The `perf_schema.eventsstatements` collector was incorrectly exposing
"tmp_tables" as "tmp_disk_tables" and vice versa, due to query result
being scanned in incorrect order.

Closes #849

Signed-off-by: Cristian Greco <[email protected]>
  • Loading branch information
cristiangreco authored Aug 27, 2024
1 parent bb4b4ba commit afcd075
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collector/perf_schema_events_statements.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (ScrapePerfEventsStatements) Scrape(ctx context.Context, instance *instance
)
for perfSchemaEventsStatementsRows.Next() {
if err := perfSchemaEventsStatementsRows.Scan(
&schemaName, &digest, &digestText, &count, &queryTime, &errors, &warnings, &rowsAffected, &rowsSent, &rowsExamined, &tmpTables, &tmpDiskTables, &sortMergePasses, &sortRows, &noIndexUsed,
&schemaName, &digest, &digestText, &count, &queryTime, &errors, &warnings, &rowsAffected, &rowsSent, &rowsExamined, &tmpDiskTables, &tmpTables, &sortMergePasses, &sortRows, &noIndexUsed,
); err != nil {
return err
}
Expand Down

0 comments on commit afcd075

Please sign in to comment.