From 8a64c58bfc8d38dc5610a4bd90f0fd8122c01fa1 Mon Sep 17 00:00:00 2001 From: zhexuany Date: Wed, 25 Apr 2018 11:04:38 +0800 Subject: [PATCH] address reviewer's comment --- executor/show.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/executor/show.go b/executor/show.go index b90989a374074..4913dffc320fd 100644 --- a/executor/show.go +++ b/executor/show.go @@ -632,15 +632,8 @@ func (e *ShowExec) fetchShowCreateTable() error { } for i, def := range partitionInfo.Definitions { lessThans := "" - multipleLt := false - for j, lessThan := range def.LessThan { - if j > 0 { - lessThans = lessThans + "," + lessThan - multipleLt = true - } else { - lessThans = lessThan - } - } + lessThans = strings.Join(def.LessThan, ",") + multipleLt := len(def.LessThan) > 1 var parDef string if multipleLt {