Skip to content

Commit

Permalink
kv: mapping txn too large error code to mysql (#4661)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao authored Sep 27, 2017
1 parent 0e4e8c9 commit f303336
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kv/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ var (

func init() {
kvMySQLErrCodes := map[terror.ErrCode]uint16{
codeKeyExists: mysql.ErrDupEntry,
codeKeyExists: mysql.ErrDupEntry,
codeEntryTooLarge: mysql.ErrTooBigRowsize,
codeTxnTooLarge: mysql.ErrTxnTooLarge,
}
terror.ErrClassToMySQLCodes[terror.ClassKV] = kvMySQLErrCodes
}
Expand Down
2 changes: 2 additions & 0 deletions mysql/errcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -897,4 +897,6 @@ const (
ErrTiKVServerBusy = 9003
ErrResolveLockTimeout = 9004
ErrRegionUnavaiable = 9005

ErrTxnTooLarge = 9500
)
2 changes: 2 additions & 0 deletions mysql/errname.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,4 +894,6 @@ var MySQLErrName = map[uint16]string{
ErrTiKVServerBusy: "TiKV server is busy",
ErrResolveLockTimeout: "Resolve lock timeout",
ErrRegionUnavaiable: "Region is unavaiable",

ErrTxnTooLarge: "Transaction is too large",
}

0 comments on commit f303336

Please sign in to comment.