Skip to content

Commit

Permalink
executor, planner: fix plan_replayer zip format (#47474) (#47713)
Browse files Browse the repository at this point in the history
close #46474
  • Loading branch information
ti-chi-bot authored Oct 17, 2023
1 parent 7ab8f8c commit 266a56d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions executor/plan_replayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ func (e *PlanReplayerLoadInfo) Update(data []byte) error {
continue
}
path := strings.Split(zipFile.Name, "/")
if len(path) == 2 && strings.Compare(path[0], "schema") == 0 {
if len(path) == 2 && strings.Compare(path[0], "schema") == 0 && zipFile.Mode().IsRegular() {
err = createSchemaAndItems(e.Ctx, zipFile)
if err != nil {
return err
Expand All @@ -500,7 +500,7 @@ func (e *PlanReplayerLoadInfo) Update(data []byte) error {
// build view next
for _, zipFile := range z.File {
path := strings.Split(zipFile.Name, "/")
if len(path) == 2 && strings.Compare(path[0], "view") == 0 {
if len(path) == 2 && strings.Compare(path[0], "view") == 0 && zipFile.Mode().IsRegular() {
err = createSchemaAndItems(e.Ctx, zipFile)
if err != nil {
return err
Expand All @@ -511,7 +511,7 @@ func (e *PlanReplayerLoadInfo) Update(data []byte) error {
// load stats
for _, zipFile := range z.File {
path := strings.Split(zipFile.Name, "/")
if len(path) == 2 && strings.Compare(path[0], "stats") == 0 {
if len(path) == 2 && strings.Compare(path[0], "stats") == 0 && zipFile.Mode().IsRegular() {
err = loadStats(e.Ctx, zipFile)
if err != nil {
return err
Expand Down

0 comments on commit 266a56d

Please sign in to comment.