From c00f9e48f140cbf788573c1ba79d7e4450652db8 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Tue, 8 Oct 2024 13:27:44 +0300 Subject: [PATCH] MySQL errors: `ERWrongParamcountToNativeFct` Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- go/mysql/sqlerror/constants.go | 1 + go/vt/vttablet/tabletmanager/vreplication/utils.go | 1 + go/vt/vttablet/tabletserver/tabletserver.go | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go/mysql/sqlerror/constants.go b/go/mysql/sqlerror/constants.go index ce4b38d3fda..da2351bf00d 100644 --- a/go/mysql/sqlerror/constants.go +++ b/go/mysql/sqlerror/constants.go @@ -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) diff --git a/go/vt/vttablet/tabletmanager/vreplication/utils.go b/go/vt/vttablet/tabletmanager/vreplication/utils.go index 230fe6a249c..bb1c469cc93 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/utils.go +++ b/go/vt/vttablet/tabletmanager/vreplication/utils.go @@ -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) diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index 75cd5dec08e..a1dc6e77157 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -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