diff --git a/executor/executor.go b/executor/executor.go index 3d10ff32a5168..6401d41e7e77e 100644 --- a/executor/executor.go +++ b/executor/executor.go @@ -602,9 +602,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 ""