-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.severity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
This error is found by #52688. There are two ways to reproduce this error.
- Apply the following change on master and run
TestRenameTable
diff --git a/pkg/executor/test/ddl/main_test.go b/pkg/executor/test/ddl/main_test.go
index f5f05d63d2..7159aefdb9 100644
--- a/pkg/executor/test/ddl/main_test.go
+++ b/pkg/executor/test/ddl/main_test.go
@@ -24,7 +24,7 @@ import (
)
func TestMain(m *testing.M) {
- autoid.SetStep(5000)
+ autoid.SetStep(1)
config.UpdateGlobal(func(conf *config.Config) {
conf.Log.SlowThreshold = 30000 // 30s
conf.TiKVClient.AsyncCommit.SafeWindow = 0
--
2.39.3 (Apple Git-146)
Start tidb server and run following SQLs:
create database test1;
create database test2;
create table test1.t (a int primary key auto_increment);
insert into test1.t values();
rename table test1.t to test2.t;
drop database test1;
Restart server and run
insert into test2.t values();
2. What did you expect to see? (Required)
- Test passed.
- Insert succeed.
3. What did you see instead (Required)
- Test failed.
ERROR 1062 (23000): Duplicate entry '1' for key 't.PRIMARY'
4. What is your TiDB version? (Required)
Metadata
Metadata
Assignees
Labels
affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.severity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.