Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddl: do not unset involving schema on EntryTooLarge error (#51963) #51965

Merged
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
17 changes: 17 additions & 0 deletions ddl/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1621,3 +1621,20 @@ func TestMDLTruncateTable(t *testing.T) {
require.True(t, timetk2.After(timeMain))
require.True(t, timetk3.After(timeMain))
}

func TestDDLJobErrEntrySizeTooLarge(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)

tk.MustExec("use test")
tk.MustExec("create table t (a int);")

require.NoError(t, failpoint.Enable("github.com/pingcap/tidb/ddl/mockErrEntrySizeTooLarge", `1*return(true)`))
t.Cleanup(func() {
require.NoError(t, failpoint.Disable("github.com/pingcap/tidb/ddl/mockErrEntrySizeTooLarge"))
})

tk.MustGetErrCode("rename table t to t1;", errno.ErrEntryTooLarge)
tk.MustExec("create table t1 (a int);")
tk.MustExec("alter table t add column b int;") // Should not block.
}
1 change: 0 additions & 1 deletion ddl/ddl_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ func (w *worker) handleUpdateJobError(t *meta.Meta, job *model.Job, err error) e
}
// Reduce this txn entry size.
job.BinlogInfo.Clean()
job.InvolvingSchemaInfo = nil
job.Error = toTError(err)
job.ErrorCount++
job.SchemaState = model.StateNone
Expand Down
9 changes: 0 additions & 9 deletions pkg/executor/test/executor/BUILD.bazel

This file was deleted.

39 changes: 0 additions & 39 deletions pkg/executor/test/executor/executor_test.go

This file was deleted.