Skip to content

Commit

Permalink
[parser] mysql: update mysql error code/name for 3146/3069 (pingcap#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
bb7133 authored and xhebox committed Oct 8, 2021
1 parent 5c3a283 commit 1d85544
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion parser/mysql/errcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,7 @@ const (
ErrMustChangePasswordLogin = 1862
ErrRowInWrongPartition = 1863
ErrErrorLast = 1863
ErrInvalidJSONData = 3069
ErrGeneratedColumnFunctionIsNotAllowed = 3102
ErrBadGeneratedColumn = 3105
ErrUnsupportedOnGeneratedColumn = 3106
Expand All @@ -890,7 +891,7 @@ const (
ErrGeneratedColumnRefAutoInc = 3109
ErrInvalidJSONText = 3140
ErrInvalidJSONPath = 3143
ErrInvalidJSONData = 3146
ErrInvalidTypeForJSON = 3146
ErrInvalidJSONPathWildcard = 3149
ErrInvalidJSONContainsPathType = 3150
ErrJSONUsedAsKey = 3152
Expand Down
3 changes: 2 additions & 1 deletion parser/mysql/errname.go
Original file line number Diff line number Diff line change
Expand Up @@ -885,9 +885,10 @@ var MySQLErrName = map[uint16]string{
ErrDependentByGeneratedColumn: "Column '%s' has a generated column dependency.",
ErrGeneratedColumnFunctionIsNotAllowed: "Expression of generated column '%s' contains a disallowed function.",
ErrGeneratedColumnRefAutoInc: "Generated column '%s' cannot refer to auto-increment column.",
ErrInvalidJSONData: "Invalid JSON data provided to function %s: %s",
ErrInvalidJSONText: "Invalid JSON text: %-.192s",
ErrInvalidJSONPath: "Invalid JSON path expression %s.",
ErrInvalidJSONData: "Invalid data type for JSON data",
ErrInvalidTypeForJSON: "Invalid data type for JSON data in argument %d to function %s; a JSON string or JSON type is required.",
ErrInvalidJSONPathWildcard: "In this situation, path expressions may not contain the * and ** tokens.",
ErrInvalidJSONContainsPathType: "The second argument can only be either 'one' or 'all'.",
ErrJSONUsedAsKey: "JSON column '%-.192s' cannot be used in key specification.",
Expand Down

0 comments on commit 1d85544

Please sign in to comment.