We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please answer these questions before submitting your issue. Thanks!
func TestInsertIgnore2(t *testing.T) { store, dom := testkit.CreateMockStoreAndDomain(t) defer ingesttestutil.InjectMockBackendMgr(t, store)() tk := testkit.NewTestKit(t, store) tk.MustExec("use test") tk.MustExec("create table t(a int DEFAULT '-13202', b varchar(221) NOT NULL DEFAULT 'duplicatevalue', " + "c int NOT NULL DEFAULT '0', PRIMARY KEY (c, b));") tk1 := testkit.NewTestKit(t, store) tk1.MustExec("use test") d := dom.DDL() originalCallback := d.GetHook() defer d.SetHook(originalCallback) callback := &callback.TestDDLCallback{} tk1.Exec("INSERT INTO t VALUES (-18585,'duplicatevalue',0);") onJobUpdatedExportedFunc := func(job *model.Job) { switch job.SchemaState { case model.StateDeleteOnly: _, err := tk1.Exec("REPLACE INTO t VALUES (-18585,'duplicatevalue',1);") assert.NoError(t, err) } } callback.OnJobUpdatedExported.Store(&onJobUpdatedExportedFunc) d.SetHook(callback) tk3 := testkit.NewTestKit(t, store) tk3.MustExec("use test") ddl.MockDMLExecutionStateBeforeImport = func() { tk3.MustExec("insert ignore INTO t VALUES (-18585,'duplicatevalue',1), (-18585,'duplicatevalue',3);") } require.NoError(t, failpoint.Enable("github.com/pingcap/tidb/pkg/ddl/mockDMLExecutionStateBeforeImport", "return(true)")) tk.MustExec("alter table t add unique index idx(b);") tk.MustExec("admin check table t;") require.NoError(t, failpoint.Disable("github.com/pingcap/tidb/pkg/ddl/mockDMLExecutionStateBeforeImport")) }
Test passes.
[admin:8223]data inconsistency in table: t, index: idx, handle: {0, duplicatevalue}, index-values:"" != record-values:"handle: {0, duplicatevalue}, values: [KindString duplicatevalue]"
nightly
The text was updated successfully, but these errors were encountered:
tangenta
Successfully merging a pull request may close this issue.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
Test passes.
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
nightly
The text was updated successfully, but these errors were encountered: