Skip to content

Commit

Permalink
fix(dbm-services): 忽略create_db 后使用的usedb #8640
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq authored and iSecloud committed Dec 16, 2024
1 parent cecc8a2 commit efd76fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@ func (tf *TmysqlParseFile) DoParseRelationDbs(version string) (createDbs, relati
return nil, nil, false, err
}
logger.Info("createDbs:%v,relationDbs:%v,dumpAll:%v,err:%v", createDbs, relationDbs, dumpAll, err)
return createDbs, relationDbs, dumpAll, nil
dumpdbs := []string{}
for _, d := range relationDbs {
if slices.Contains(createDbs, d) {
break
}
dumpdbs = append(dumpdbs, d)
}
return lo.Uniq(createDbs), lo.Uniq(dumpdbs), dumpAll, nil
}

// doParseInchan RelationDbs do parse relation db
Expand Down
1 change: 1 addition & 0 deletions dbm-services/mysql/db-simulation/handler/syntax_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ func (s SyntaxHandler) ParseSQLFileRelationDb(r *gin.Context) {
s.SendResponse(r, err, nil)
return
}

s.SendResponse(r, nil, gin.H{
"create_dbs": createDbs,
"dbs": dbs,
Expand Down

0 comments on commit efd76fd

Please sign in to comment.