Skip to content

Commit

Permalink
ddl: add admin restore syntax support (pingcap#85)
Browse files Browse the repository at this point in the history
eg: admin restore table by job 11
  • Loading branch information
crazycs520 authored Jan 4, 2019
1 parent 9da90a0 commit d7bae25
Show file tree
Hide file tree
Showing 6 changed files with 5,380 additions and 5,346 deletions.
1 change: 1 addition & 0 deletions ast/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ const (
AdminChecksumTable
AdminShowSlow
AdminShowNextRowID
AdminRestoreTable
)

// HandleRange represents a range where handle value >= Begin and < End.
Expand Down
1 change: 1 addition & 0 deletions misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ var tokenMap = map[string]int{
"RESPECT": respect,
"REPLICATION": replication,
"RESTRICT": restrict,
"RESTORE": restore,
"REVERSE": reverse,
"REVOKE": revoke,
"RIGHT": right,
Expand Down
2 changes: 2 additions & 0 deletions model/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const (
ActionModifyTableCharsetAndCollate ActionType = 22
ActionTruncateTablePartition ActionType = 23
ActionDropView ActionType = 24
ActionRestoreTable ActionType = 25
)

// AddIndexStr is a string related to the operation of "add index".
Expand Down Expand Up @@ -84,6 +85,7 @@ var actionMap = map[ActionType]string{
ActionModifyTableCharsetAndCollate: "modify table charset and collate",
ActionTruncateTablePartition: "truncate partition",
ActionDropView: "drop view",
ActionRestoreTable: "restore table",
}

// String return current ddl action in string
Expand Down
Loading

0 comments on commit d7bae25

Please sign in to comment.