Skip to content

Commit

Permalink
executor, planner: fix plan_replayer zip format (#47474)
Browse files Browse the repository at this point in the history
close #46474
  • Loading branch information
YangKeao authored Oct 11, 2023
1 parent e69b781 commit c27c73c
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 @@ -486,7 +486,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 @@ -503,7 +503,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 @@ -514,7 +514,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 c27c73c

Please sign in to comment.