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

mysql: add ddl-related error code and name #630

Merged
merged 5 commits into from
Nov 12, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions mysql/errcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,23 @@ const (
ErrUnsupportedValueForVar = 8047
ErrUnsupportedIsolationLevel = 8048

// Error codes used by TiDB ddl package
ErrUnsupportedDDLOperation = 8200
ErrNotOwner = 8201
ErrCantDecodeIndex = 8202
ErrInvalidDDLWorker = 8203
ErrInvalidDDLJob = 8204
ErrInvalidDDLJobFlag = 8205
ErrWaitReorgTimeout = 8206
ErrInvalidStoreVersion = 8207
ErrUnknownTypeLength = 8208
ErrUnknownFractionLength = 8209
ErrInvalidDDLState = 8210
ErrReorgPanic = 8211
ErrInvalidSplitRegionRanges = 8212
ErrInvalidDDLJobVersion = 8213
ErrCancelledDDLJob = 8214

// TiKV/PD errors.
ErrPDServerTimeout = 9001
ErrTiKVServerTimeout = 9002
Expand Down
15 changes: 15 additions & 0 deletions mysql/errname.go
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,21 @@ var MySQLErrName = map[uint16]string{
ErrInvalidRecordKey: "invalid record key",
ErrUnsupportedValueForVar: "variable '%s' does not yet support value: %s",
ErrUnsupportedIsolationLevel: "The isolation level '%s' is not supported. Set tidb_skip_isolation_level_check=1 to skip this error",
ErrInvalidDDLWorker: "Invalid DDL worker",
ErrUnsupportedDDLOperation: "Unsupported %s",
ErrNotOwner: "TiDB server is not a DDL owner",
ErrCantDecodeIndex: "Cannot decode index value, because %s",
ErrInvalidDDLJob: "Invalid DDL job",
ErrInvalidDDLJobFlag: "Invalid DDL job flag",
ErrWaitReorgTimeout: "Timeout waiting for data reorganization",
ErrInvalidStoreVersion: "Invalid storage current version: %d",
ErrUnknownTypeLength: "Unknown length for type %d",
ErrUnknownFractionLength: "Unknown length for type %d and fraction %d",
ErrInvalidDDLJobVersion: "Version %d of DDL job is greater than current one: %d",
ErrInvalidSplitRegionRanges: "Failed to split region ranges",
ErrReorgPanic: "Reorg worker panic",
ErrInvalidDDLState: "Invalid %s state: %v",
ErrCancelledDDLJob: "Cancelled DDL job",
bb7133 marked this conversation as resolved.
Show resolved Hide resolved

// TiKV/PD errors.
ErrPDServerTimeout: "PD server timeout",
Expand Down