Skip to content

Commit

Permalink
444
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq committed Dec 9, 2024
1 parent b9a2575 commit df2445e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions dbm-services/mysql/db-simulation/app/syntax/parse_relation_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -82,19 +82,18 @@ 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
}
if dumpAllDbs {
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)
}
Expand Down

0 comments on commit df2445e

Please sign in to comment.