Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: lance6716 <[email protected]>
  • Loading branch information
lance6716 committed Mar 22, 2023
1 parent 935bcd2 commit 98b8e9e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions session/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -2501,6 +2501,10 @@ func doDDLWorks(s Session, dom *domain.Domain) {
tableInfosPart1 = append(tableInfosPart1, tblInfo)
}
batchCreateTable(s, dom.DDL(), tableInfosPart1)
// batchCreateTable is an optimization, in order to keep same behaviour with
// before (such as assign same table ID to these tables), we need to execute
// the DDLs in order. CreateMDLView is a view that cannot use batchCreateTable,
// so it breaks tables into allCreateTablesPart1 and allCreateTablesPart2.
mustExecute(s, CreateMDLView)
tableInfosPart2 := make([]*model.TableInfo, 0, len(allCreateTablesPart2))
for _, createTable := range allCreateTablesPart2 {
Expand Down

0 comments on commit 98b8e9e

Please sign in to comment.