Skip to content

Commit

Permalink
add error code (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
cfzjywxk authored and jackysp committed Dec 16, 2019
1 parent 7320ce0 commit 53ef012
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mysql/errcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,16 @@ const (
ErrCancelledDDLJob = 8214
ErrRepairTable = 8215
ErrInvalidAutoRandom = 8216
ErrInvalidHashKeyFlag = 8217
ErrInvalidListIndex = 8218
ErrInvalidListMetaData = 8219
ErrWriteOnSnapshot = 8220
ErrInvalidKey = 8221
ErrInvalidIndexKey = 8222
ErrDataInConsistent = 8223
ErrDDLJobNotFound = 8224
ErrCancelFinishedDDLJob = 8225
ErrCannotCancelDDLJob = 8226

// TiKV/PD errors.
ErrPDServerTimeout = 9001
Expand Down
10 changes: 10 additions & 0 deletions mysql/errname.go
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,16 @@ var MySQLErrName = map[uint16]string{
ErrSnapshotTooOld: "snapshot is older than GC safe point %s",
ErrInvalidTableID: "invalid TableID",
ErrInvalidAutoRandom: "Invalid auto random: %s",
ErrInvalidHashKeyFlag: "invalid encoded hash key flag",
ErrInvalidListIndex: "invalid list index",
ErrInvalidListMetaData: "invalid list meta data",
ErrWriteOnSnapshot: "write on snapshot",
ErrInvalidKey: "invalid key",
ErrInvalidIndexKey: "invalid index key",
ErrDataInConsistent: "data isn't equal",
ErrDDLJobNotFound: "DDL Job:%v not found",
ErrCancelFinishedDDLJob: "This job:%v is finished, so can't be cancelled",
ErrCannotCancelDDLJob: "This job:%v is almost finished, can't be cancelled now",

ErrUnsupportedType: "Unsupported type %T",
ErrAnalyzeMissIndex: "Index '%s' in field list does not exist in table '%s'",
Expand Down

0 comments on commit 53ef012

Please sign in to comment.