From 8f33c7fa21b8d04bdc7095353b352f0f8b56855c Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Thu, 21 Jul 2022 16:48:19 +0800 Subject: [PATCH] ddl: skip to close the sessPool Signed-off-by: Weizhen Wang --- ddl/ddl.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ddl/ddl.go b/ddl/ddl.go index 96f0abeb0b12a..0e04bf3f82263 100644 --- a/ddl/ddl.go +++ b/ddl/ddl.go @@ -723,7 +723,9 @@ func (d *ddl) close() { if d.delRangeMgr != nil { d.delRangeMgr.clear() } - d.sessPool.close() + if d.sessPool != nil { + d.sessPool.close() + } variable.UnregisterStatistics(d) logutil.BgLogger().Info("[ddl] DDL closed", zap.String("ID", d.uuid), zap.Duration("take time", time.Since(startTime)))