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: fix goword checker bugs in insert*.go #26257

Merged
merged 3 commits into from
Jul 16, 2021
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
4 changes: 2 additions & 2 deletions executor/insert_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ type InsertValues struct {
hasRefCols bool
hasExtraHandle bool

// Fill the autoID lazily to datum. This is used for being compatible with JDBC using getGeneratedKeys().
// lazyFillAutoID indicates whatever had been filled the autoID lazily to datum. This is used for being compatible with JDBC using getGeneratedKeys().
// `insert|replace values` can guarantee consecutive autoID in a batch.
// Other statements like `insert select from` don't guarantee consecutive autoID.
// https://dev.mysql.com/doc/refman/8.0/en/innodb-auto-increment-handling.html
Expand All @@ -86,7 +86,7 @@ type InsertValues struct {

stats *InsertRuntimeStat

// LoadData use two goroutines. One for generate batch data,
// isLoadData indicates whatever current goroutine is use for generating batch data. LoadData use two goroutines. One for generate batch data,
// The other one for commit task, which will invalid txn.
// We use mutex to protect routine from using invalid txn.
isLoadData bool
Expand Down
4 changes: 2 additions & 2 deletions executor/insert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ func (s *testSuite3) TestInsertFloatOverflow(c *C) {
tk.MustExec("drop table if exists t,t1")
}

// There is a potential issue in MySQL: when the value of auto_increment_offset is greater
// TestAutoIDIncrementAndOffset There is a potential issue in MySQL: when the value of auto_increment_offset is greater
// than that of auto_increment_increment, the value of auto_increment_offset is ignored
// (https://dev.mysql.com/doc/refman/8.0/en/replication-options-master.html#sysvar_auto_increment_increment),
// This issue is a flaw of the implementation of MySQL and it doesn't exist in TiDB.
Expand Down Expand Up @@ -1571,7 +1571,7 @@ func combination(items []string) func() []string {
}
}

// See https://github.com/pingcap/tidb/issues/24582
// TestDuplicatedEntryErr See https://github.com/pingcap/tidb/issues/24582
func (s *testSuite10) TestDuplicatedEntryErr(c *C) {
tk := testkit.NewTestKit(c, s.store)
tk.MustExec("use test")
Expand Down