Skip to content

Commit

Permalink
Revert "support bind resource group to user (pingcap#24)" (pingcap#25)
Browse files Browse the repository at this point in the history
This reverts commit 40cb9bf.
  • Loading branch information
BornChanger authored Nov 17, 2022
1 parent 40cb9bf commit d9a366e
Show file tree
Hide file tree
Showing 4 changed files with 6,341 additions and 6,403 deletions.
29 changes: 0 additions & 29 deletions parser/ast/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ var (
_ DDLNode = &AlterSequenceStmt{}
_ DDLNode = &AlterPlacementPolicyStmt{}
_ DDLNode = &AlterResourceGroupStmt{}
_ DDLNode = &AlterUserResourceGroupStmt{}
_ DDLNode = &CreateDatabaseStmt{}
_ DDLNode = &CreateIndexStmt{}
_ DDLNode = &CreateTableStmt{}
Expand Down Expand Up @@ -4355,34 +4354,6 @@ func (n *AlterResourceGroupStmt) Accept(v Visitor) (Node, bool) {
return v.Leave(n)
}

type AlterUserResourceGroupStmt struct {
ddlNode
IfExists bool
UserSpec *UserSpec
RGroupName model.CIStr
}

func (n *AlterUserResourceGroupStmt) Restore(ctx *format.RestoreCtx) error {
ctx.WriteKeyWord("ALTER USER ")
if n.IfExists {
ctx.WriteKeyWord("IF EXISTS ")
}
n.UserSpec.Restore(ctx)
ctx.WriteKeyWord(" RESOURCE GROUP ")
ctx.WriteName(n.RGroupName.O)

return nil
}

func (n *AlterUserResourceGroupStmt) Accept(v Visitor) (Node, bool) {
newNode, skipChildren := v.Enter(n)
if skipChildren {
return v.Leave(newNode)
}
n = newNode.(*AlterUserResourceGroupStmt)
return v.Leave(n)
}

// AlterSequenceStmt is a statement to alter sequence option.
type AlterSequenceStmt struct {
ddlNode
Expand Down
Loading

0 comments on commit d9a366e

Please sign in to comment.