Skip to content

Commit

Permalink
MySQL errors: ERInnodbIndexCorrupt (#16851)
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <[email protected]>
  • Loading branch information
shlomi-noach authored Oct 6, 2024
1 parent 9b999b2 commit 246caf0
Show file tree
Hide file tree
Showing 2 changed files with 2 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 @@ -123,6 +123,7 @@ const (
ErSPNotVarArg = ErrorCode(1414)
ERRowIsReferenced2 = ErrorCode(1451)
ErNoReferencedRow2 = ErrorCode(1452)
ERInnodbIndexCorrupt = ErrorCode(1817)
ERDupIndex = ErrorCode(1831)
ERInnodbReadOnly = ErrorCode(1874)

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 @@ -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
Expand Down

0 comments on commit 246caf0

Please sign in to comment.