Browse Source

fix: 同步数据库时,忽略 recycle_bin (#2591)

Refs #2589
release-1.7
ssongliu 1 year ago committed by wanghe-fit2cloud
parent
commit
0b5b90d0c5
  1. 2
      backend/utils/mysql/client/local.go
  2. 2
      backend/utils/mysql/client/remote.go

2
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" {
if parts[0] == "SCHEMA_NAME" || parts[0] == "information_schema" || parts[0] == "mysql" || parts[0] == "performance_schema" || parts[0] == "sys" || parts[0] == "recycle_bin" {
continue
}
dataItem := SyncDBInfo{

2
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" {
if dbName == "information_schema" || dbName == "mysql" || dbName == "performance_schema" || dbName == "sys" || dbName == "recycle_bin" {
continue
}
dataItem := SyncDBInfo{

Loading…
Cancel
Save