Skip to content

Commit

Permalink
executor: fix admin show job panic when upgrade from v4.0 to v6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tangenta authored and ti-chi-bot committed Nov 10, 2022
1 parent c1cb351 commit cdebc39
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,11 @@ func (e *DDLJobRetriever) appendJobToChunk(req *chunk.Chunk, job *model.Job, che

func showAddIdxReorgTp(job *model.Job) string {
if job.Type == model.ActionAddIndex || job.Type == model.ActionAddPrimaryKey {
tp := job.ReorgMeta.ReorgTp.String()
if len(tp) > 0 {
return " /* " + tp + " */"
if job.ReorgMeta != nil {
tp := job.ReorgMeta.ReorgTp.String()
if len(tp) > 0 {
return " /* " + tp + " */"
}
}
}
return ""
Expand Down

0 comments on commit cdebc39

Please sign in to comment.