Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions go/inst/instance_dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -3468,15 +3468,14 @@ func PopulateGroupReplicationInformation(instance *Instance, db *sql.DB) error {
`
rows, err := db.Query(q)
if err != nil {
_, grNotSupported := GroupReplicationNotSupportedErrors[err.(*mysql.MySQLError).Number]
if grNotSupported {
return nil // If GR is not supported by the instance, just exit
} else {
// If we got here, the query failed but not because the server does not support group replication. Let's
// log the error
return log.Errorf("There was an error trying to check group replication information for instance "+
"%+v: %+v", instance.Key, err)
var mysqlErr *mysql.MySQLError
if errors.As(err, &mysqlErr) {
if _, ok := GroupReplicationNotSupportedErrors[mysqlErr.Number]; ok {
return nil // If GR is not supported by the instance, just exit
}
}
return log.Errorf("There was an error trying to check group replication information for instance "+
"%+v: %+v", instance.Key, err)
}
defer rows.Close()
foundGroupPrimary := false
Expand Down