Skip to content

Commit

Permalink
mysql(ticdc): remove error filter when check isTiDB in backend init (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jun 11, 2024
1 parent 2425d54 commit 2a28078
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/sink/mysql/db_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,7 @@ func CheckIsTiDB(ctx context.Context, db *sql.DB) (bool, error) {
err := row.Scan(&tidbVer)
if err != nil {
log.Error("check tidb version error", zap.Error(err))
// downstream is not TiDB, do nothing
if mysqlErr, ok := errors.Cause(err).(*dmysql.MySQLError); ok && (mysqlErr.Number == tmysql.ErrNoDB ||
mysqlErr.Number == tmysql.ErrSpDoesNotExist || mysqlErr.Number == tmysql.ErrDBaccessDenied) {
return false, nil
}
return false, errors.Trace(err)
return false, nil
}
return true, nil
}
Expand Down

0 comments on commit 2a28078

Please sign in to comment.