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 @@ -790,16 +790,14 @@ func (n *SetRoleStmt) Restore(ctx *RestoreCtx) error {
790790 case SetRoleAllExcept :
791791 ctx .WriteKeyWord (" ALL EXCEPT" )
792792 }
793- if len (n .RoleList ) > 0 {
794- for i , role := range n .RoleList {
795- ctx .WritePlain (" " )
796- err := role .Restore (ctx )
797- if err != nil {
798- return errors .Annotate (err , "An error occurred while restore SetRoleStmt.RoleList" )
799- }
800- if i != len (n .RoleList )- 1 {
801- ctx .WritePlain ("," )
802- }
793+ for i , role := range n .RoleList {
794+ ctx .WritePlain (" " )
795+ err := role .Restore (ctx )
796+ if err != nil {
797+ return errors .Annotate (err , "An error occurred while restore SetRoleStmt.RoleList" )
798+ }
799+ if i != len (n .RoleList )- 1 {
800+ ctx .WritePlain ("," )
803801 }
804802 }
805803 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