Skip to content

Commit

Permalink
ddl: clone table meta for recover table (#55443)
Browse files Browse the repository at this point in the history
close #55442
  • Loading branch information
joechenrh authored Aug 16, 2024
1 parent 2045418 commit f73e3e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/executor/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ func (e *DDLExec) getRecoverTableByJobID(s *ast.RecoverTableStmt, dom *domain.Do
fmt.Sprintf("(Table ID %d)", job.TableID),
)
}
return job, table.Meta(), nil
// Return the cloned meta here, since meta will be modified later.
// This may corrupt the infocache.
return job, table.Meta().Clone(), nil
}

// GetDropOrTruncateTableInfoFromJobs gets the dropped/truncated table information from DDL jobs,
Expand Down

0 comments on commit f73e3e3

Please sign in to comment.