From df2445e1b6120b566d4e897123f931ceebafe428 Mon Sep 17 00:00:00 2001 From: yuanruji Date: Mon, 9 Dec 2024 16:57:02 +0800 Subject: [PATCH] 444 --- .../db-simulation/app/syntax/parse_relation_db.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dbm-services/mysql/db-simulation/app/syntax/parse_relation_db.go b/dbm-services/mysql/db-simulation/app/syntax/parse_relation_db.go index d0429eaba3..d5abdf7b7a 100644 --- a/dbm-services/mysql/db-simulation/app/syntax/parse_relation_db.go +++ b/dbm-services/mysql/db-simulation/app/syntax/parse_relation_db.go @@ -63,7 +63,7 @@ func (tf *TmysqlParseFile) DoParseRelationDbs(version string) (createDbs, relati logger.Error("failed to analyze the parsing result:%s", err.Error()) return nil, nil, false, err } - + logger.Info("createDbs:%v,relationDbs:%v,dumpAll:%v,err:%v", createDbs, relationDbs, dumpAll, err) return createDbs, relationDbs, dumpAll, nil } @@ -82,6 +82,7 @@ func (t *TmysqlParse) doParseInchan(alreadExecutedSqlfileCh chan string, go func(fileName string) { defer wg.Done() cdbs, dbs, dumpAllDbs, err := t.analyzeRelationDbs(fileName, mysqlVersion) + logger.Info("createDbs:%v,dbs:%v,dumpAllDbs:%v,err:%v", cdbs, dbs, dumpAllDbs, err) if err != nil { errChan <- err } @@ -89,12 +90,10 @@ func (t *TmysqlParse) doParseInchan(alreadExecutedSqlfileCh chan string, dumpAll = true stopChan <- struct{}{} } - if len(dbs) > 0 { - t.mu.Lock() - relationDbs = append(relationDbs, dbs...) - createDbs = append(createDbs, cdbs...) - t.mu.Unlock() - } + t.mu.Lock() + relationDbs = append(relationDbs, dbs...) + createDbs = append(createDbs, cdbs...) + t.mu.Unlock() <-c }(sqlfile) }