Skip to content

Commit

Permalink
errno: fix typo for overflow message (#48059)
Browse files Browse the repository at this point in the history
close #47943
  • Loading branch information
highpon authored Oct 30, 2023
1 parent 9a4997f commit 173e485
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion errors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3228,7 +3228,7 @@ Bad Number

["types:8030"]
error = '''
Cast to signed converted positive out-of-range integer to it's negative complement
Cast to signed converted positive out-of-range integer to its negative complement
'''

["types:8031"]
Expand Down
2 changes: 1 addition & 1 deletion pkg/errno/errname.go
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{
ErrInfoSchemaExpired: mysql.Message("Information schema is out of date: schema failed to update in 1 lease, please make sure TiDB can connect to TiKV", nil),
ErrInfoSchemaChanged: mysql.Message("Information schema is changed during the execution of the statement(for example, table definition may be updated by other DDL ran in parallel). If you see this error often, try increasing `tidb_max_delta_schema_count`", nil),
ErrBadNumber: mysql.Message("Bad Number", nil),
ErrCastAsSignedOverflow: mysql.Message("Cast to signed converted positive out-of-range integer to it's negative complement", nil),
ErrCastAsSignedOverflow: mysql.Message("Cast to signed converted positive out-of-range integer to its negative complement", nil),
ErrCastNegIntAsUnsigned: mysql.Message("Cast to unsigned converted negative integer to it's positive complement", nil),
ErrInvalidYearFormat: mysql.Message("invalid year format", nil),
ErrInvalidYear: mysql.Message("invalid year", nil),
Expand Down
2 changes: 1 addition & 1 deletion pkg/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ var (
ErrDuplicatedValueInType = dbterror.ClassTypes.NewStd(mysql.ErrDuplicatedValueInType)
// ErrDatetimeFunctionOverflow is returned when the calculation in datetime function cause overflow.
ErrDatetimeFunctionOverflow = dbterror.ClassTypes.NewStd(mysql.ErrDatetimeFunctionOverflow)
// ErrCastAsSignedOverflow is returned when positive out-of-range integer, and convert to it's negative complement.
// ErrCastAsSignedOverflow is returned when positive out-of-range integer, and convert to its negative complement.
ErrCastAsSignedOverflow = dbterror.ClassTypes.NewStd(mysql.ErrCastAsSignedOverflow)
// ErrCastNegIntAsUnsigned is returned when a negative integer be casted to an unsigned int.
ErrCastNegIntAsUnsigned = dbterror.ClassTypes.NewStd(mysql.ErrCastNegIntAsUnsigned)
Expand Down

0 comments on commit 173e485

Please sign in to comment.