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

executor: special handling is required when an "auto id out of range" error occurs in insert ignore into ... on on duplicate ... (#39847) #40286

Prev Previous commit
Next Next commit
Update executor/writetest/write_test.go
minor

Co-authored-by: Mattias Jonsson <mjonss@users.noreply.github.com>
  • Loading branch information
2 people authored and ti-chi-bot committed Jan 3, 2023
commit 5e2e55b8700f27fd57d06a6a8adfdc1ac6161e25
4 changes: 1 addition & 3 deletions executor/write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,9 +608,7 @@ func TestIssue38950(t *testing.T) {
tk.MustExec(testSQL)
require.Empty(t, tk.Session().LastMessage())

r := tk.MustQuery("select * from t;")
rowStr := fmt.Sprintf("%v %v", "32767", "1")
r.Check(testkit.Rows(rowStr))
tk.MustQuery("select * from t").Check(testkit.Rows("32767 1"))

tk.MustExec("insert ignore into t(id) values ('*') on duplicate key update c1 = 2;")
require.Equal(t, int64(2), int64(tk.Session().AffectedRows()))
Expand Down