Fix needless fmt.Sprintf call in go/logic/inspector.go

This commit is contained in:
Tim Vaillancourt 2022-02-24 01:30:29 +01:00
parent ac23094497
commit 1aa74bfe60

View File

@ -348,7 +348,7 @@ func (this *Inspector) validateBinlogs() error {
if !this.migrationContext.SwitchToRowBinlogFormat { if !this.migrationContext.SwitchToRowBinlogFormat {
return fmt.Errorf("You must be using ROW binlog format. I can switch it for you, provided --switch-to-rbr and that %s:%d doesn't have replicas", this.connectionConfig.Key.Hostname, this.connectionConfig.Key.Port) return fmt.Errorf("You must be using ROW binlog format. I can switch it for you, provided --switch-to-rbr and that %s:%d doesn't have replicas", this.connectionConfig.Key.Hostname, this.connectionConfig.Key.Port)
} }
query := fmt.Sprintf(`show /* gh-ost */ slave hosts`) query := `show /* gh-ost */ slave hosts`
countReplicas := 0 countReplicas := 0
err := sqlutils.QueryRowsMap(this.db, query, func(rowMap sqlutils.RowMap) error { err := sqlutils.QueryRowsMap(this.db, query, func(rowMap sqlutils.RowMap) error {
countReplicas++ countReplicas++