From 3ec6d295e1e3e4d20cad4275f4b19d6ca44cf1fc Mon Sep 17 00:00:00 2001 From: hongyunyan <649330952@qq.com> Date: Fri, 31 May 2024 14:24:55 +0800 Subject: [PATCH 1/2] update --- pkg/sink/mysql/db_helper.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/sink/mysql/db_helper.go b/pkg/sink/mysql/db_helper.go index 59be0339100..305158eee21 100644 --- a/pkg/sink/mysql/db_helper.go +++ b/pkg/sink/mysql/db_helper.go @@ -318,11 +318,6 @@ 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 true, nil From f099c875ef3a61ad273dfc56dfd1a7d0d50f9b84 Mon Sep 17 00:00:00 2001 From: hongyunyan <649330952@qq.com> Date: Fri, 31 May 2024 15:33:20 +0800 Subject: [PATCH 2/2] Update pkg/sink/mysql/db_helper.go Co-authored-by: dongmen <20351731+asddongmen@users.noreply.github.com> --- pkg/sink/mysql/db_helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sink/mysql/db_helper.go b/pkg/sink/mysql/db_helper.go index 305158eee21..decad51fc9e 100644 --- a/pkg/sink/mysql/db_helper.go +++ b/pkg/sink/mysql/db_helper.go @@ -318,7 +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)) - return false, errors.Trace(err) + return false, nil } return true, nil }