Skip to content

Commit

Permalink
[parser] parser: support show create placement policy (pingcap#1298)
Browse files Browse the repository at this point in the history
  • Loading branch information
AilinKid authored and ti-chi-bot committed Oct 9, 2021
1 parent 0036788 commit 51f9484
Show file tree
Hide file tree
Showing 4 changed files with 4,841 additions and 4,814 deletions.
4 changes: 4 additions & 0 deletions parser/ast/dml.go
Original file line number Diff line number Diff line change
Expand Up @@ -2496,6 +2496,7 @@ const (
ShowCreateView
ShowCreateUser
ShowCreateSequence
ShowCreatePlacementPolicy
ShowGrants
ShowTriggers
ShowProcedureStatus
Expand Down Expand Up @@ -2634,6 +2635,9 @@ func (n *ShowStmt) Restore(ctx *format.RestoreCtx) error {
if err := n.Table.Restore(ctx); err != nil {
return errors.Annotate(err, "An error occurred while restore ShowStmt.SEQUENCE")
}
case ShowCreatePlacementPolicy:
ctx.WriteKeyWord("CREATE PLACEMENT POLICY ")
ctx.WriteName(n.DBName)
case ShowCreateUser:
ctx.WriteKeyWord("CREATE USER ")
if err := n.User.Restore(ctx); err != nil {
Expand Down
Loading

0 comments on commit 51f9484

Please sign in to comment.