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

ddl, session: add tidb_enable_exchange_partition variable #22638

Merged
merged 7 commits into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix tests
  • Loading branch information
rebelice committed Feb 1, 2021
commit fe7ea8735c4b1439958e681edcea9f7095e0e5a1
4 changes: 2 additions & 2 deletions ddl/db_partition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3177,8 +3177,6 @@ func (s *testIntegrationSuite3) TestUnsupportedPartitionManagementDDLs(c *C) {
func (s *testIntegrationSuite7) TestCommitWhenSchemaChange(c *C) {
tk := testkit.NewTestKit(c, s.store)
tk.MustExec("use test")
tk.MustExec("set @@tidb_enable_exchange_partition=1")
defer tk.MustExec("set @@tidb_enable_exchange_partition=0")
tk.MustExec(`create table schema_change (a int, b timestamp)
partition by range(a) (
partition p0 values less than (4),
Expand All @@ -3187,6 +3185,8 @@ func (s *testIntegrationSuite7) TestCommitWhenSchemaChange(c *C) {
)`)
tk2 := testkit.NewTestKit(c, s.store)
tk2.MustExec("use test")
tk2.MustExec("set @@tidb_enable_exchange_partition=1")
defer tk2.MustExec("set @@tidb_enable_exchange_partition=0")

tk.MustExec("begin")
tk.MustExec("insert into schema_change values (1, '2019-12-25 13:27:42')")
Expand Down
4 changes: 2 additions & 2 deletions ddl/failtest/fail_db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ func (s *testFailDBSuite) TestHalfwayCancelOperations(c *C) {
tk := testkit.NewTestKit(c, s.store)
tk.MustExec("create database cancel_job_db")
tk.MustExec("use cancel_job_db")
tk.MustExec("set @@tidb_enable_exchange_partition=1")
defer tk.MustExec("set @@tidb_enable_exchange_partition=0")

// test for truncating table
tk.MustExec("create table t(a int)")
Expand Down Expand Up @@ -162,6 +160,8 @@ func (s *testFailDBSuite) TestHalfwayCancelOperations(c *C) {
tk.MustExec("insert into pt values(1), (3), (5)")
tk.MustExec("create table nt(a int)")
tk.MustExec("insert into nt values(7)")
tk.MustExec("set @@tidb_enable_exchange_partition=1")
defer tk.MustExec("set @@tidb_enable_exchange_partition=0")
_, err = tk.Exec("alter table pt exchange partition p1 with table nt")
c.Assert(err, NotNil)

Expand Down