fix: 同步数据库时, 忽略recycle_bin和__recycle_bin__ (#2664)

* fix: 同步数据库时, 忽略recycle_bin改为__recycle_bin__

* fix: 同步数据库时, 忽略recycle_bin和__recycle_bin__

---------

Co-authored-by: tt <www@tt.local>
Co-authored-by: shao <shao@mac.local>
This commit is contained in:
shao 2023-10-24 22:26:47 +08:00 committed by GitHub
parent 3c3fd5fd78
commit f30f561723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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{

View File

@ -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{