Skip to content

Commit

Permalink
MySQL errors: ERWrongParamcountToNativeFct
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <[email protected]>
  • Loading branch information
shlomi-noach committed Oct 8, 2024
1 parent f40e076 commit c00f9e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions go/mysql/sqlerror/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ const (
ERNoSuchUser = ErrorCode(1449)
ERForbidSchemaChange = ErrorCode(1450)
ERWrongValue = ErrorCode(1525)
ERWrongParamcountToNativeFct = ErrorCode(1582)
ERDataOutOfRange = ErrorCode(1690)
ERInvalidJSONText = ErrorCode(3140)
ERInvalidJSONTextInParams = ErrorCode(3141)
Expand Down
1 change: 1 addition & 0 deletions go/vt/vttablet/tabletmanager/vreplication/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ func isUnrecoverableError(err error) bool {
sqlerror.ERWrongParametersToProcedure,
sqlerror.ERWrongUsage,
sqlerror.ERWrongValue,
sqlerror.ERWrongParamcountToNativeFct,
sqlerror.ERVectorConversion,
sqlerror.ERWrongValueCountOnRow:
log.Errorf("Got unrecoverable error: %v", sqlErr)
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vttablet/tabletserver/tabletserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ func convertErrorCode(err error) vtrpcpb.Code {
sqlerror.ERCantAggregate3Collations, sqlerror.ERCantAggregateNCollations, sqlerror.ERVariableIsNotStruct, sqlerror.ERUnknownCollation, sqlerror.ERWrongNameForIndex,
sqlerror.ERWrongNameForCatalog, sqlerror.ERBadFTColumn, sqlerror.ERTruncatedWrongValue, sqlerror.ERTooMuchAutoTimestampCols, sqlerror.ERInvalidOnUpdate, sqlerror.ERUnknownTimeZone,
sqlerror.ERInvalidCharacterString, sqlerror.ERIllegalReference, sqlerror.ERDerivedMustHaveAlias, sqlerror.ERTableNameNotAllowedHere, sqlerror.ERDataTooLong, sqlerror.ERDataOutOfRange,
sqlerror.ERTruncatedWrongValueForField, sqlerror.ERIllegalValueForType:
sqlerror.ERTruncatedWrongValueForField, sqlerror.ERIllegalValueForType, sqlerror.ERWrongValue, sqlerror.ERWrongParamcountToNativeFct:
errCode = vtrpcpb.Code_INVALID_ARGUMENT
case sqlerror.ERSpecifiedAccessDenied:
errCode = vtrpcpb.Code_PERMISSION_DENIED
Expand Down

0 comments on commit c00f9e4

Please sign in to comment.