From f5171e334e6ede388db85af3cc182ca4d5e16207 Mon Sep 17 00:00:00 2001 From: tangenta Date: Thu, 10 Nov 2022 22:25:52 +0800 Subject: [PATCH] executor: fix admin show job panic when upgrade from v4.0 to v6.4 (#39067) close pingcap/tidb#38980 --- executor/executor.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 ""