Skip to content

Commit

Permalink
*: fix information_schema copy bug
Browse files Browse the repository at this point in the history
Signed-off-by: BornChanger <dawn_catcher@126.com>
  • Loading branch information
BornChanger committed Jan 18, 2023
1 parent 83be3f0 commit 5847cc1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions infoschema/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ func (b *Builder) InitWithOldInfoSchema(oldSchema InfoSchema) *Builder {
b.copySchemasMap(oldIS)
b.copyBundlesMap(oldIS)
b.copyPoliciesMap(oldIS)
b.copyResourceGroupMap(oldIS)
b.copyTemporaryTableIDsMap(oldIS)
b.copyReferredForeignKeyMap(oldIS)

Expand Down Expand Up @@ -885,6 +886,13 @@ func (b *Builder) copyPoliciesMap(oldIS *infoSchema) {
}
}

func (b *Builder) copyResourceGroupMap(oldIS *infoSchema) {
is := b.is
for _, v := range oldIS.AllResourceGroups() {
is.resourceGroupMap[v.Name.L] = v
}
}

func (b *Builder) copyTemporaryTableIDsMap(oldIS *infoSchema) {
is := b.is
if len(oldIS.temporaryTableIDs) == 0 {
Expand Down

0 comments on commit 5847cc1

Please sign in to comment.