Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions go/mysql/sqlerror/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@ const (
ERKeyDoesNotExist = ErrorCode(1176)

// permissions
ERDBAccessDenied = ErrorCode(1044)
ERAccessDeniedError = ErrorCode(1045)
ERKillDenied = ErrorCode(1095)
ERNoPermissionToCreateUsers = ErrorCode(1211)
ERSpecifiedAccessDenied = ErrorCode(1227)
ERDBAccessDenied = ErrorCode(1044)
ERAccessDeniedError = ErrorCode(1045)
ERKillDenied = ErrorCode(1095)
ERNoPermissionToCreateUsers = ErrorCode(1211)
ERSpecifiedAccessDenied = ErrorCode(1227)
ERBinlogCreateRoutineNeedSuper = ErrorCode(1419)

// failed precondition
ERNoDb = ErrorCode(1046)
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 @@ -214,6 +214,7 @@ func isUnrecoverableError(err error) bool {
sqlerror.ErrWrongValueForType,
sqlerror.ERSPDoesNotExist,
sqlerror.ERSpecifiedAccessDenied,
sqlerror.ERBinlogCreateRoutineNeedSuper,
sqlerror.ERSyntaxError,
sqlerror.ERTooBigRowSize,
sqlerror.ERTooBigSet,
Expand Down
5 changes: 5 additions & 0 deletions go/vt/vttablet/tabletmanager/vreplication/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ func TestIsUnrecoverableError(t *testing.T) {
err: sqlerror.NewSQLError(sqlerror.ERErrorDuringCommit, "unknown", "ERROR HY000: Got error 149 - 'Lock deadlock; Retry transaction' during COMMIT"),
expected: false,
},
{
name: "SQL error with ERBinlogCreateRoutineNeedSuper",
err: sqlerror.NewSQLError(sqlerror.ERBinlogCreateRoutineNeedSuper, "unknown", "error applying event: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) (errno 1419) (sqlstate HY000) during query: CREATE DEFINER=`root`@`localhost` TRIGGER upd_customer BEFORE UPDATE ON customer FOR EACH ROW SET @email = NEW.email + \" (updated)\""),
expected: true,
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
Expand Down
Loading