From f30f561723f7e8ea278cd1e8302d4ff449f4e210 Mon Sep 17 00:00:00 2001 From: shao <706954178@qq.com> Date: Tue, 24 Oct 2023 22:26:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=90=8C=E6=AD=A5=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E6=97=B6,=20=E5=BF=BD=E7=95=A5recycle=5Fbin=E5=92=8C?= =?UTF-8?q?=5F=5Frecycle=5Fbin=5F=5F=20(#2664)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 同步数据库时, 忽略recycle_bin改为__recycle_bin__ * fix: 同步数据库时, 忽略recycle_bin和__recycle_bin__ --------- Co-authored-by: tt Co-authored-by: shao --- backend/utils/mysql/client/local.go | 2 +- backend/utils/mysql/client/remote.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/utils/mysql/client/local.go b/backend/utils/mysql/client/local.go index 7c1f74635..a155f8ee9 100644 --- a/backend/utils/mysql/client/local.go +++ b/backend/utils/mysql/client/local.go @@ -269,7 +269,7 @@ func (r *Local) SyncDB(version string) ([]SyncDBInfo, error) { if len(parts) != 2 { continue } - if parts[0] == "SCHEMA_NAME" || parts[0] == "information_schema" || parts[0] == "mysql" || parts[0] == "performance_schema" || parts[0] == "sys" || parts[0] == "__recycle_bin__" { + if parts[0] == "SCHEMA_NAME" || parts[0] == "information_schema" || parts[0] == "mysql" || parts[0] == "performance_schema" || parts[0] == "sys" || parts[0] == "__recycle_bin__" || parts[0] == "recycle_bin" { continue } dataItem := SyncDBInfo{ diff --git a/backend/utils/mysql/client/remote.go b/backend/utils/mysql/client/remote.go index 251087d41..9f1e0ee3b 100644 --- a/backend/utils/mysql/client/remote.go +++ b/backend/utils/mysql/client/remote.go @@ -279,7 +279,7 @@ func (r *Remote) SyncDB(version string) ([]SyncDBInfo, error) { if err = rows.Scan(&dbName, &charsetName); err != nil { return datas, err } - if dbName == "information_schema" || dbName == "mysql" || dbName == "performance_schema" || dbName == "sys" || dbName == "__recycle_bin__" { + if dbName == "information_schema" || dbName == "mysql" || dbName == "performance_schema" || dbName == "sys" || dbName == "__recycle_bin__" || parts[0] == "recycle_bin" { continue } dataItem := SyncDBInfo{