File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -753,16 +753,14 @@ func (n *SetRoleStmt) Restore(ctx *RestoreCtx) error {
753753 case SetRoleAllExcept :
754754 ctx .WriteKeyWord (" ALL EXCEPT" )
755755 }
756- if len (n .RoleList ) > 0 {
757- for i , role := range n .RoleList {
758- ctx .WritePlain (" " )
759- err := role .Restore (ctx )
760- if err != nil {
761- return errors .Annotate (err , "An error occurred while restore SetRoleStmt.RoleList" )
762- }
763- if i != len (n .RoleList )- 1 {
764- ctx .WritePlain ("," )
765- }
756+ for i , role := range n .RoleList {
757+ ctx .WritePlain (" " )
758+ err := role .Restore (ctx )
759+ if err != nil {
760+ return errors .Annotate (err , "An error occurred while restore SetRoleStmt.RoleList" )
761+ }
762+ if i != len (n .RoleList )- 1 {
763+ ctx .WritePlain ("," )
766764 }
767765 }
768766 return nil
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ require (
1111 github.com/pingcap/errors v0.11.0
1212 github.com/pingcap/tidb v0.0.0-20190218065808-69472bd1a6e9
1313 github.com/pingcap/tipb v0.0.0-20190107072121-abbec73437b7
14- github.com/shirou/gopsutil v2.18.12+incompatible // indirect
1514 github.com/sirupsen/logrus v1.3.0
1615 golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2
1716)
You can’t perform that action at this time.
0 commit comments