Skip to content
Open
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
8 changes: 4 additions & 4 deletions errors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2871,14 +2871,14 @@ error = '''
Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting.
'''

["schema:3809"]
["schema:3822"]
error = '''
Schema '%s' is in read only mode.
Duplicate check constraint name '%s'.
'''

["schema:3822"]
["schema:3989"]
error = '''
Duplicate check constraint name '%s'.
Schema '%s' is in read only mode.
'''

["schema:4139"]
Expand Down
4 changes: 2 additions & 2 deletions pkg/ddl/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ func TestSchemaReadOnlyAffectAllUsers(t *testing.T) {
tk.MustExec(fmt.Sprintf("create user '%s'@'%%'", tc.user))
tk.MustExec(fmt.Sprintf("grant %s on *.* to '%s'@'%%'", tc.priv, tc.user))
require.NoError(t, se.Auth(&auth.UserIdentity{Username: tc.user, Hostname: "%"}, nil, nil, nil))
tk.MustGetErrMsg("insert into test.t values (1)", "[schema:3809]Schema 'test' is in read only mode.")
tk.MustGetErrMsg("insert into test.t values (1)", "[schema:3989]Schema 'test' is in read only mode.")
}
tk.MustExec("alter database test read only = 0")
for _, tc := range tcs {
Expand Down Expand Up @@ -691,7 +691,7 @@ func TestReadOnlyInMiddleState(t *testing.T) {
dbInfo, ok := is.SchemaByName(pmodel.NewCIStr("test_db"))
require.True(t, ok)
require.True(t, dbInfo.ReadOnly)
tk3.MustGetErrMsg("insert into test_db.t values (1)", "[schema:3809]Schema 'test_db' is in read only mode.")
tk3.MustGetErrMsg("insert into test_db.t values (1)", "[schema:3989]Schema 'test_db' is in read only mode.")
tk1.MustExec("commit")
wg.Wait()
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/errno/errcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,6 @@ const (
ErrDefValGeneratedNamedFunctionIsNotAllowed = 3770
ErrFKIncompatibleColumns = 3780
ErrFunctionalIndexRowValueIsNotAllowed = 3800
ErrSchemaInReadOnlyMode = 3809
ErrNonBooleanExprForCheckConstraint = 3812
ErrColumnCheckConstraintReferencesOtherColumn = 3813
ErrCheckConstraintNamedFunctionIsNotAllowed = 3814
Expand All @@ -944,6 +943,7 @@ const (
ErUserAccessDeniedForUserAccountBlockedByPasswordLock = 3955
ErrDependentByCheckConstraint = 3959
ErrJSONInBooleanContext = 3986
ErrSchemaInReadOnlyMode = 3989
ErrTableWithoutPrimaryKey = 3750
// MariaDB errors.
ErrOnlyOneDefaultPartionAllowed = 4030
Expand Down
Loading