Skip to content

Commit b679430

Browse files
authored
test(ticdc): fix duplicate entry about multi_source test (#12085)
ref #11879
1 parent 6973b6b commit b679430

File tree

1 file changed

+3
-2
lines changed
  • tests/integration_tests/multi_source

1 file changed

+3
-2
lines changed

tests/integration_tests/multi_source/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ func dml(ctx context.Context, db *sql.DB, table string, id int) {
210210
var i int
211211
var insertSuccess int
212212
var deleteSuccess int
213-
insertSQL := fmt.Sprintf("insert into test.`%s`(id1, id2) values(?,?)", table)
213+
insertSQL := fmt.Sprintf("insert into test.`%s`(id, id1, id2) values(?,?,?)", table)
214214
deleteSQL := fmt.Sprintf("delete from test.`%s` where id1 = ? or id2 = ?", table)
215215
k := 100000000
216216
for i = 0; i < k; i++ {
217-
_, err = db.Exec(insertSQL, i+id*k, i+id*k+1)
217+
_, err = db.Exec(insertSQL, i+id*k, i+id*k, i+id*k+1)
218218
if err == nil {
219219
insertSuccess++
220220
if insertSuccess%100 == 0 {
@@ -382,6 +382,7 @@ const (
382382
createTableSQL = `
383383
create table if not exists test.%s
384384
(
385+
id int primary key,
385386
id1 int unique key not null,
386387
id2 int unique key not null,
387388
v1 int default null

0 commit comments

Comments
 (0)