Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <[email protected]>
  • Loading branch information
hawkingrei committed Nov 4, 2024
1 parent d6c4cbf commit b7eb73d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 717 deletions.
29 changes: 0 additions & 29 deletions executor/plan_replayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,32 +526,3 @@ func (e *PlanReplayerLoadInfo) Update(data []byte) error {
}
return nil
}
<<<<<<< HEAD:executor/plan_replayer.go
=======

func (e *PlanReplayerLoadInfo) createTable(z *zip.Reader) error {
originForeignKeyChecks := e.Ctx.GetSessionVars().ForeignKeyChecks
originPlacementMode := e.Ctx.GetSessionVars().PlacementMode
// We need to disable foreign key check when we create schema and tables.
// because the order of creating schema and tables is not guaranteed.
e.Ctx.GetSessionVars().ForeignKeyChecks = false
e.Ctx.GetSessionVars().PlacementMode = variable.PlacementModeIgnore
defer func() {
e.Ctx.GetSessionVars().ForeignKeyChecks = originForeignKeyChecks
e.Ctx.GetSessionVars().PlacementMode = originPlacementMode
}()
for _, zipFile := range z.File {
if zipFile.Name == fmt.Sprintf("schema/%v", domain.PlanReplayerSchemaMetaFile) {
continue
}
path := strings.Split(zipFile.Name, "/")
if len(path) == 2 && strings.Compare(path[0], "schema") == 0 && zipFile.Mode().IsRegular() {
err := createSchemaAndItems(e.Ctx, zipFile)
if err != nil {
return err
}
}
}
return nil
}
>>>>>>> f37210f6ba8 (executor: fix plan replay cannot deal with placement mode (#56774)):pkg/executor/plan_replayer.go
Loading

0 comments on commit b7eb73d

Please sign in to comment.