diff --git a/go/mysql/sqlerror/constants.go b/go/mysql/sqlerror/constants.go index a61239ce17b..ce4b38d3fda 100644 --- a/go/mysql/sqlerror/constants.go +++ b/go/mysql/sqlerror/constants.go @@ -123,6 +123,7 @@ const ( ErSPNotVarArg = ErrorCode(1414) ERRowIsReferenced2 = ErrorCode(1451) ErNoReferencedRow2 = ErrorCode(1452) + ERInnodbIndexCorrupt = ErrorCode(1817) ERDupIndex = ErrorCode(1831) ERInnodbReadOnly = ErrorCode(1874) diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index 4936516be72..75cd5dec08e 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -1620,7 +1620,7 @@ func convertErrorCode(err error) vtrpcpb.Code { sqlerror.ERTooLongString, sqlerror.ERDelayedInsertTableLocked, sqlerror.ERDupUnique, sqlerror.ERRequiresPrimaryKey, sqlerror.ERCantDoThisDuringAnTransaction, sqlerror.ERReadOnlyTransaction, sqlerror.ERCannotAddForeign, sqlerror.ERNoReferencedRow, sqlerror.ERRowIsReferenced, sqlerror.ERCantUpdateWithReadLock, sqlerror.ERNoDefault, sqlerror.EROperandColumns, sqlerror.ERSubqueryNo1Row, sqlerror.ERNonUpdateableTable, sqlerror.ERFeatureDisabled, sqlerror.ERDuplicatedValueInType, sqlerror.ERRowIsReferenced2, - sqlerror.ErNoReferencedRow2, sqlerror.ERWarnDataOutOfRange: + sqlerror.ErNoReferencedRow2, sqlerror.ERWarnDataOutOfRange, sqlerror.ERInnodbIndexCorrupt: errCode = vtrpcpb.Code_FAILED_PRECONDITION case sqlerror.EROptionPreventsStatement: errCode = vtrpcpb.Code_CLUSTER_EVENT