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 4 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 @@ -727,6 +727,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 @@ -53,6 +53,7 @@ const (
ActionCreateView ActionType = 21
ActionModifyTableCharsetAndCollate ActionType = 22
ActionTruncateTablePartition ActionType = 23
ActionRestoreTable ActionType = 24
)

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

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