Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddl: add admin restore syntax support #85

Merged
merged 5 commits into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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