Skip to content

Commit

Permalink
fix error messages containing slave word
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur1 committed Oct 7, 2024
1 parent 3f35b78 commit a529809
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,13 @@ func (m *MySQLPlugin) fetchShowReplicaStatus(db *sql.DB, stat map[string]float64
}
rows, err := db.Query(command)
if err != nil {
return fmt.Errorf("FetchMetrics (Slave Status): %w", err)
return fmt.Errorf("FetchMetrics (Replica Status): %w", err)
}
defer rows.Close()
for rows.Next() {
columns, err := rows.ColumnTypes()
if err != nil {
return fmt.Errorf("FetchMetrics (Slave Status): %w", err)
return fmt.Errorf("FetchMetrics (Replica Status): %w", err)
}

valuePtrs := make([]interface{}, len(columns))
Expand All @@ -321,7 +321,7 @@ func (m *MySQLPlugin) fetchShowReplicaStatus(db *sql.DB, stat map[string]float64
valuePtrs[i] = &values[i]
}
if err = rows.Scan(valuePtrs...); err != nil {
return fmt.Errorf("FetchMetrics (Slave Status): %w", err)
return fmt.Errorf("FetchMetrics (Replica Status): %w", err)
}
for i, column := range columns {
variableName := column.Name()
Expand Down

0 comments on commit a529809

Please sign in to comment.