diff --git a/ast/misc.go b/ast/misc.go index 28b5d49ad..091458d57 100755 --- a/ast/misc.go +++ b/ast/misc.go @@ -753,16 +753,14 @@ func (n *SetRoleStmt) Restore(ctx *RestoreCtx) error { case SetRoleAllExcept: ctx.WriteKeyWord(" ALL EXCEPT") } - if len(n.RoleList) > 0 { - for i, role := range n.RoleList { - ctx.WritePlain(" ") - err := role.Restore(ctx) - if err != nil { - return errors.Annotate(err, "An error occurred while restore SetRoleStmt.RoleList") - } - if i != len(n.RoleList)-1 { - ctx.WritePlain(",") - } + for i, role := range n.RoleList { + ctx.WritePlain(" ") + err := role.Restore(ctx) + if err != nil { + return errors.Annotate(err, "An error occurred while restore SetRoleStmt.RoleList") + } + if i != len(n.RoleList)-1 { + ctx.WritePlain(",") } } return nil diff --git a/go.mod1 b/go.mod1 index c2006d20d..dd28256d7 100755 --- a/go.mod1 +++ b/go.mod1 @@ -11,7 +11,6 @@ require ( github.com/pingcap/errors v0.11.0 github.com/pingcap/tidb v0.0.0-20190218065808-69472bd1a6e9 github.com/pingcap/tipb v0.0.0-20190107072121-abbec73437b7 - github.com/shirou/gopsutil v2.18.12+incompatible // indirect github.com/sirupsen/logrus v1.3.0 golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 )