diff --git a/ddl/db_integration_test.go b/ddl/db_integration_test.go index b7a2b2a26e37a..9fe96a50afa02 100644 --- a/ddl/db_integration_test.go +++ b/ddl/db_integration_test.go @@ -57,8 +57,6 @@ var _ = Suite(&testIntegrationSuite3{&testIntegrationSuite{}}) var _ = Suite(&testIntegrationSuite4{&testIntegrationSuite{}}) var _ = Suite(&testIntegrationSuite5{&testIntegrationSuite{}}) var _ = Suite(&testIntegrationSuite6{&testIntegrationSuite{}}) -var _ = SerialSuites(&testIntegrationSuite7{&testIntegrationSuite{}}) -var _ = SerialSuites(&testIntegrationSuite8{&testIntegrationSuite{}}) type testIntegrationSuite struct { lease time.Duration @@ -127,8 +125,6 @@ type testIntegrationSuite4 struct{ *testIntegrationSuite } type testIntegrationSuite5 struct{ *testIntegrationSuite } type testIntegrationSuite6 struct{ *testIntegrationSuite } type testIntegrationSuite7 struct{ *testIntegrationSuite } -type testIntegrationSuite8 struct{ *testIntegrationSuite } -type testIntegrationSuite9 struct{ *testIntegrationSuite } func (s *testIntegrationSuite5) TestNoZeroDateMode(c *C) { tk := testkit.NewTestKit(c, s.store) @@ -223,9 +219,10 @@ func (s *testIntegrationSuite2) TestCreateTableWithKeyWord(c *C) { c.Assert(err, IsNil) } -func (s *testIntegrationSuite1) TestUniqueKeyNullValue(c *C) { +func (s *testIntegrationSuite6) TestUniqueKeyNullValue(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("USE test") + tk.MustExec("drop table if exists t") tk.MustExec("create table t(a int primary key, b varchar(255))") tk.MustExec("insert into t values(1, NULL)") @@ -308,7 +305,7 @@ func (s *testIntegrationSuite2) TestIssue19229(c *C) { tk.MustExec("drop table sett") } -func (s *testIntegrationSuite1) TestIndexLength(c *C) { +func (s *testIntegrationSuite7) TestIndexLength(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") tk.MustExec("create table idx_len(a int(0), b timestamp(0), c datetime(0), d time(0), f float(0), g decimal(0))") @@ -384,7 +381,7 @@ func (s *testIntegrationSuite1) TestIssue4432(c *C) { tk.MustExec("drop table tx") } -func (s *testIntegrationSuite1) TestIssue5092(c *C) { +func (s *testIntegrationSuite7) TestIssue5092(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") @@ -641,6 +638,9 @@ func (s *testIntegrationSuite3) TestTableDDLWithFloatType(c *C) { } func (s *testIntegrationSuite1) TestTableDDLWithTimeType(c *C) { + if israce.RaceEnabled { + c.Skip("skip race test") + } tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") tk.MustExec("drop table if exists t") @@ -1059,7 +1059,7 @@ func (s *testIntegrationSuite4) TestIndexOnMultipleGeneratedColumn5(c *C) { tk.MustExec("admin check table t") } -func (s *testIntegrationSuite2) TestCaseInsensitiveCharsetAndCollate(c *C) { +func (s *testIntegrationSuite6) TestCaseInsensitiveCharsetAndCollate(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("create database if not exists test_charset_collate") @@ -1288,41 +1288,6 @@ func (s *testIntegrationSuite5) TestBackwardCompatibility(c *C) { tk.MustExec("admin check index t idx_b") } -func (s *testIntegrationSuite3) TestMultiRegionGetTableEndHandle(c *C) { - tk := testkit.NewTestKit(c, s.store) - tk.MustExec("drop database if exists test_get_endhandle") - tk.MustExec("create database test_get_endhandle") - tk.MustExec("use test_get_endhandle") - - tk.MustExec("create table t(a bigint PRIMARY KEY nonclustered, b int)") - for i := 0; i < 1000; i++ { - tk.MustExec(fmt.Sprintf("insert into t values(%v, %v)", i, i)) - } - - // Get table ID for split. - dom := domain.GetDomain(tk.Se) - is := dom.InfoSchema() - tbl, err := is.TableByName(model.NewCIStr("test_get_endhandle"), model.NewCIStr("t")) - c.Assert(err, IsNil) - tblID := tbl.Meta().ID - - d := s.dom.DDL() - testCtx := newTestMaxTableRowIDContext(c, d, tbl) - - // Split the table. - tableStart := tablecodec.GenTableRecordPrefix(tblID) - s.cluster.SplitKeys(tableStart, tableStart.PrefixNext(), 100) - - maxHandle, emptyTable := getMaxTableHandle(testCtx, s.store) - c.Assert(emptyTable, IsFalse) - c.Assert(maxHandle, Equals, kv.IntHandle(1000)) - - tk.MustExec("insert into t values(10000, 1000)") - maxHandle, emptyTable = getMaxTableHandle(testCtx, s.store) - c.Assert(emptyTable, IsFalse) - c.Assert(maxHandle, Equals, kv.IntHandle(1001)) -} - type testMaxTableRowIDContext struct { c *C d ddl.DDL @@ -1369,6 +1334,9 @@ func getHistoryDDLJob(store kv.Storage, id int64) (*model.Job, error) { } func (s *testIntegrationSuite6) TestCreateTableTooLarge(c *C) { + if israce.RaceEnabled { + c.Skip("skip race test") + } tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") @@ -1390,7 +1358,7 @@ func (s *testIntegrationSuite6) TestCreateTableTooLarge(c *C) { atomic.StoreUint32(&config.GetGlobalConfig().TableColumnCountLimit, originLimit) } -func (s *testIntegrationSuite8) TestCreateTableTooManyIndexes(c *C) { +func (s *testSerialDBSuite1) TestCreateTableTooManyIndexes(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") @@ -1519,7 +1487,7 @@ func (s *testIntegrationSuite6) TestAddColumnTooMany(c *C) { tk.MustGetErrCode(alterSQL, errno.ErrTooManyFields) } -func (s *testIntegrationSuite8) TestCreateTooManyIndexes(c *C) { +func (s *testSerialDBSuite1) TestCreateTooManyIndexes(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") count := config.GetGlobalConfig().IndexLimit - 1 @@ -1541,7 +1509,7 @@ func (s *testIntegrationSuite8) TestCreateTooManyIndexes(c *C) { tk.MustGetErrCode(alterSQL, errno.ErrTooManyKeys) } -func (s *testIntegrationSuite8) TestCreateSecondaryIndexInCluster(c *C) { +func (s *testSerialDBSuite1) TestCreateSecondaryIndexInCluster(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") @@ -2271,7 +2239,7 @@ func (s *testIntegrationSuite3) TestParserIssue284(c *C) { tk.MustExec("drop table test.t_parser_issue_284_2") } -func (s *testIntegrationSuite7) TestAddExpressionIndex(c *C) { +func (s *testSerialDBSuite1) TestAddExpressionIndex(c *C) { config.UpdateGlobal(func(conf *config.Config) { conf.Experimental.AllowsExpressionIndex = true }) @@ -2337,7 +2305,7 @@ func (s *testIntegrationSuite7) TestAddExpressionIndex(c *C) { tk.MustGetErrMsg("create table t(a int, key ((a+1)));", "[ddl:8200]Unsupported creating expression index without allow-expression-index in config") } -func (s *testIntegrationSuite7) TestCreateExpressionIndexError(c *C) { +func (s *testSerialDBSuite1) TestCreateExpressionIndexError(c *C) { defer config.RestoreFunc()() config.UpdateGlobal(func(conf *config.Config) { conf.Experimental.AllowsExpressionIndex = true @@ -2380,7 +2348,7 @@ func (s *testIntegrationSuite7) TestCreateExpressionIndexError(c *C) { tk.MustGetErrCode("CREATE TABLE t1 (col1 INT, PRIMARY KEY ((ABS(col1))) NONCLUSTERED);", errno.ErrFunctionalIndexPrimaryKey) } -func (s *testIntegrationSuite7) TestAddExpressionIndexOnPartition(c *C) { +func (s *testSerialDBSuite1) TestAddExpressionIndexOnPartition(c *C) { config.UpdateGlobal(func(conf *config.Config) { conf.Experimental.AllowsExpressionIndex = true }) @@ -2634,7 +2602,7 @@ func (s *testSerialDBSuite) TestDropLastVisibleColumnOrColumns(c *C) { tk.MustExec("drop table if exists t_drop_last_column, t_drop_last_columns") } -func (s *testIntegrationSuite7) TestAutoIncrementTableOption(c *C) { +func (s *testSerialDBSuite1) TestAutoIncrementTableOption(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("drop database if exists test_auto_inc_table_opt;") tk.MustExec("create database test_auto_inc_table_opt;") @@ -2726,7 +2694,7 @@ func (s *testIntegrationSuite3) TestStrictDoubleTypeCheck(c *C) { tk.MustExec(sql) } -func (s *testIntegrationSuite7) TestDuplicateErrorMessage(c *C) { +func (s *testSerialDBSuite) TestDuplicateErrorMessage(c *C) { defer collate.SetNewCollationEnabledForTest(false) tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") diff --git a/ddl/db_partition_test.go b/ddl/db_partition_test.go index b52644c151fd4..b261ca3f98519 100644 --- a/ddl/db_partition_test.go +++ b/ddl/db_partition_test.go @@ -45,6 +45,7 @@ import ( "github.com/pingcap/tidb/types" "github.com/pingcap/tidb/util/admin" "github.com/pingcap/tidb/util/collate" + "github.com/pingcap/tidb/util/israce" "github.com/pingcap/tidb/util/mock" "github.com/pingcap/tidb/util/testkit" ) @@ -359,7 +360,7 @@ func (s *testIntegrationSuite2) TestCreateTableWithHashPartition(c *C) { tk.MustExec("create table t4 (a int, b int) partition by hash(floor(a-b)) partitions 10") } -func (s *testIntegrationSuite7) TestCreateTableWithRangeColumnPartition(c *C) { +func (s *testSerialDBSuite1) TestCreateTableWithRangeColumnPartition(c *C) { collate.SetNewCollationEnabledForTest(true) defer collate.SetNewCollationEnabledForTest(false) tk := testkit.NewTestKit(c, s.store) @@ -593,6 +594,9 @@ create table log_message_1 ( } func (s *testIntegrationSuite1) TestDisableTablePartition(c *C) { + if israce.RaceEnabled { + c.Skip("skip race test") + } tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test;") for _, v := range []string{"'AUTO'", "'OFF'", "0", "'ON'"} { @@ -1603,7 +1607,7 @@ func (s *testIntegrationSuite5) TestMultiPartitionDropAndTruncate(c *C) { result.Check(testkit.Rows(`2010`)) } -func (s *testIntegrationSuite7) TestDropPartitionWithGlobalIndex(c *C) { +func (s *testSerialDBSuite1) TestDropPartitionWithGlobalIndex(c *C) { config.UpdateGlobal(func(conf *config.Config) { conf.EnableGlobalIndex = true }) @@ -1641,7 +1645,7 @@ func (s *testIntegrationSuite7) TestDropPartitionWithGlobalIndex(c *C) { }) } -func (s *testIntegrationSuite7) TestAlterTableExchangePartition(c *C) { +func (s *testSerialDBSuite1) TestAlterTableExchangePartition(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") tk.MustExec("drop table if exists e") @@ -2076,7 +2080,7 @@ func (s *testIntegrationSuite4) TestExchangePartitionTableCompatiable(c *C) { c.Assert(err, IsNil) } -func (s *testIntegrationSuite7) TestExchangePartitionExpressIndex(c *C) { +func (s *testSerialDBSuite1) TestExchangePartitionExpressIndex(c *C) { config.UpdateGlobal(func(conf *config.Config) { conf.Experimental.AllowsExpressionIndex = true }) @@ -3205,7 +3209,7 @@ func (s *testIntegrationSuite3) TestUnsupportedPartitionManagementDDLs(c *C) { c.Assert(err, ErrorMatches, ".*alter table partition is unsupported") } -func (s *testIntegrationSuite7) TestCommitWhenSchemaChange(c *C) { +func (s *testSerialDBSuite1) TestCommitWhenSchemaChange(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") tk.MustExec(`create table schema_change (a int, b timestamp) @@ -3270,7 +3274,7 @@ func (s *testIntegrationSuite7) TestCommitWhenSchemaChange(c *C) { tk.MustQuery("select * from nt").Check(testkit.Rows()) } -func (s *testIntegrationSuite7) TestCreatePartitionTableWithWrongType(c *C) { +func (s *testSerialDBSuite1) TestCreatePartitionTableWithWrongType(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") tk.MustExec("drop table if exists t") @@ -3311,7 +3315,7 @@ func (s *testIntegrationSuite7) TestCreatePartitionTableWithWrongType(c *C) { c.Assert(err, NotNil) } -func (s *testIntegrationSuite7) TestAddPartitionForTableWithWrongType(c *C) { +func (s *testSerialDBSuite1) TestAddPartitionForTableWithWrongType(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") tk.MustExec("drop tables if exists t_int, t_char, t_date") @@ -3361,7 +3365,7 @@ func (s *testIntegrationSuite7) TestAddPartitionForTableWithWrongType(c *C) { c.Assert(ddl.ErrWrongTypeColumnValue.Equal(err), IsTrue) } -func (s *testIntegrationSuite7) TestPartitionListWithTimeType(c *C) { +func (s *testSerialDBSuite1) TestPartitionListWithTimeType(c *C) { tk := testkit.NewTestKitWithInit(c, s.store) tk.MustExec("use test;") tk.MustExec("set @@session.tidb_enable_list_partition = ON") @@ -3370,7 +3374,7 @@ func (s *testIntegrationSuite7) TestPartitionListWithTimeType(c *C) { tk.MustQuery(`select * from t_list1 partition (p0);`).Check(testkit.Rows("2018-02-03")) } -func (s *testIntegrationSuite7) TestPartitionListWithNewCollation(c *C) { +func (s *testSerialDBSuite1) TestPartitionListWithNewCollation(c *C) { collate.SetNewCollationEnabledForTest(true) defer collate.SetNewCollationEnabledForTest(false) tk := testkit.NewTestKitWithInit(c, s.store) @@ -3387,7 +3391,7 @@ func (s *testIntegrationSuite7) TestPartitionListWithNewCollation(c *C) { c.Assert(strings.Contains(str, "partition:p0"), IsTrue) } -func (s *testIntegrationSuite7) TestAddTableWithPartition(c *C) { +func (s *testSerialDBSuite1) TestAddTableWithPartition(c *C) { tk := testkit.NewTestKitWithInit(c, s.store) tk.MustExec("use test;") tk.MustExec("drop table if exists global_partition_table;") diff --git a/ddl/db_test.go b/ddl/db_test.go index ecef0d0144215..1ae6ac0ff3efd 100644 --- a/ddl/db_test.go +++ b/ddl/db_test.go @@ -76,8 +76,9 @@ var _ = Suite(&testDBSuite4{&testDBSuite{}}) var _ = Suite(&testDBSuite5{&testDBSuite{}}) var _ = Suite(&testDBSuite6{&testDBSuite{}}) var _ = Suite(&testDBSuite7{&testDBSuite{}}) -var _ = SerialSuites(&testSerialDBSuite{&testDBSuite{}}) var _ = Suite(&testDBSuite8{&testDBSuite{}}) +var _ = SerialSuites(&testSerialDBSuite{&testDBSuite{}}) +var _ = SerialSuites(&testSerialDBSuite1{&testDBSuite{}}) const defaultBatchSize = 1024 const defaultReorgBatchSize = 256 @@ -90,6 +91,7 @@ type testDBSuite struct { s session.Session lease time.Duration autoIDStep int64 + ctx sessionctx.Context } func setUpSuite(s *testDBSuite, c *C) { @@ -114,6 +116,7 @@ func setUpSuite(s *testDBSuite, c *C) { c.Assert(err, IsNil) s.s, err = session.CreateSession4Test(s.store) c.Assert(err, IsNil) + s.ctx = s.s.(sessionctx.Context) _, err = s.s.Execute(context.Background(), "create database test_db") c.Assert(err, IsNil) @@ -145,8 +148,9 @@ type testDBSuite4 struct{ *testDBSuite } type testDBSuite5 struct{ *testDBSuite } type testDBSuite6 struct{ *testDBSuite } type testDBSuite7 struct{ *testDBSuite } -type testSerialDBSuite struct{ *testDBSuite } type testDBSuite8 struct{ *testDBSuite } +type testSerialDBSuite struct{ *testDBSuite } +type testSerialDBSuite1 struct{ *testDBSuite } func testAddIndexWithPK(tk *testkit.TestKit) { tk.MustExec("drop table if exists test_add_index_with_pk") @@ -287,7 +291,7 @@ func backgroundExec(s kv.Storage, sql string, done chan error) { } // TestAddPrimaryKeyRollback1 is used to test scenarios that will roll back when a duplicate primary key is encountered. -func (s *testDBSuite5) TestAddPrimaryKeyRollback1(c *C) { +func (s *testDBSuite8) TestAddPrimaryKeyRollback1(c *C) { hasNullValsInKey := false idxName := "PRIMARY" addIdxSQL := "alter table t1 add primary key c3_index (c3);" @@ -296,7 +300,7 @@ func (s *testDBSuite5) TestAddPrimaryKeyRollback1(c *C) { } // TestAddPrimaryKeyRollback2 is used to test scenarios that will roll back when a null primary key is encountered. -func (s *testDBSuite1) TestAddPrimaryKeyRollback2(c *C) { +func (s *testDBSuite8) TestAddPrimaryKeyRollback2(c *C) { hasNullValsInKey := true idxName := "PRIMARY" addIdxSQL := "alter table t1 add primary key c3_index (c3);" @@ -444,7 +448,7 @@ LOOP: tk.MustExec("drop table t1") } -func (s *testDBSuite5) TestCancelAddPrimaryKey(c *C) { +func (s *testDBSuite8) TestCancelAddPrimaryKey(c *C) { idxName := "primary" addIdxSQL := "alter table t1 add primary key idx_c2 (c2);" testCancelAddIndex(c, s.store, s.dom.DDL(), s.lease, idxName, addIdxSQL, "", s.dom) @@ -460,7 +464,7 @@ func (s *testDBSuite5) TestCancelAddPrimaryKey(c *C) { tk.MustExec("drop table t1") } -func (s *testDBSuite3) TestCancelAddIndex(c *C) { +func (s *testDBSuite7) TestCancelAddIndex(c *C) { idxName := "c3_index " addIdxSQL := "create unique index c3_index on t1 (c3)" testCancelAddIndex(c, s.store, s.dom.DDL(), s.lease, idxName, addIdxSQL, "", s.dom) @@ -1072,7 +1076,7 @@ func (s *testDBSuite6) TestAddMultiColumnsIndexClusterIndex(c *C) { tk.MustExec("admin check table t;") } -func (s *testDBSuite1) TestAddPrimaryKey1(c *C) { +func (s *testDBSuite6) TestAddPrimaryKey1(c *C) { testAddIndex(c, s.store, s.lease, testPlain, "create table test_add_index (c1 bigint, c2 bigint, c3 bigint, unique key(c1))", "primary") } @@ -1105,7 +1109,7 @@ func (s *testDBSuite4) TestAddPrimaryKey4(c *C) { partition p4 values less than maxvalue)`, "primary") } -func (s *testDBSuite1) TestAddIndex1(c *C) { +func (s *testDBSuite6) TestAddIndex1(c *C) { testAddIndex(c, s.store, s.lease, testPlain, "create table test_add_index (c1 bigint, c2 bigint, c3 bigint, primary key(c1))", "") } @@ -1127,7 +1131,7 @@ func (s *testDBSuite3) TestAddIndex3(c *C) { partition by hash (c1) partitions 4;`, "") } -func (s *testDBSuite4) TestAddIndex4(c *C) { +func (s *testDBSuite8) TestAddIndex4(c *C) { testAddIndex(c, s.store, s.lease, testPartition, `create table test_add_index (c1 bigint, c2 bigint, c3 bigint, primary key(c1)) partition by range columns (c1) ( @@ -2035,7 +2039,7 @@ func (s *testDBSuite5) TestCreateIndexType(c *C) { tk.MustExec(sql) } -func (s *testDBSuite1) TestColumn(c *C) { +func (s *testDBSuite6) TestColumn(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use " + s.schemaName) tk.MustExec("create table t2 (c1 int, c2 int, c3 int)") @@ -3026,7 +3030,7 @@ func (s *testDBSuite2) TestTableForeignKey(c *C) { tk.MustExec("drop table if exists t1,t2,t3,t4;") } -func (s *testDBSuite3) TestFKOnGeneratedColumns(c *C) { +func (s *testDBSuite8) TestFKOnGeneratedColumns(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") // test add foreign key to generated column @@ -4902,7 +4906,7 @@ func (s *testDBSuite1) TestModifyColumnTime_TimeToTimestamp(c *C) { testModifyColumnTime(c, s.store, tests) } -func (s *testDBSuite1) TestModifyColumnTime_DateToTime(c *C) { +func (s *testDBSuite7) TestModifyColumnTime_DateToTime(c *C) { tests := []testModifyColumnTimeCase{ // date to time {"date", `"2019-01-02"`, "time", "00:00:00", 0}, diff --git a/ddl/placement_sql_test.go b/ddl/placement_sql_test.go index fb7158681714f..36812454fb662 100644 --- a/ddl/placement_sql_test.go +++ b/ddl/placement_sql_test.go @@ -27,7 +27,7 @@ import ( "github.com/pingcap/tidb/util/testkit" ) -func (s *testDBSuite1) TestAlterTableAlterPartition(c *C) { +func (s *testDBSuite6) TestAlterTableAlterPartition(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") tk.MustExec("drop table if exists t1") diff --git a/ddl/serial_test.go b/ddl/serial_test.go index a8d245007f39c..b891cce567392 100644 --- a/ddl/serial_test.go +++ b/ddl/serial_test.go @@ -55,7 +55,7 @@ import ( var _ = SerialSuites(&testSerialSuite{}) // TODO(tangenta): Move all the parallel tests out of this file. -var _ = Suite(&testIntegrationSuite9{&testIntegrationSuite{}}) +var _ = Suite(&testIntegrationSuite7{&testIntegrationSuite{}}) type testSerialSuite struct { CommonHandleSuite @@ -113,7 +113,7 @@ func (s *testSerialSuite) TestChangeMaxIndexLength(c *C) { tk.MustExec("drop table t, t1") } -func (s *testIntegrationSuite9) TestPrimaryKey(c *C) { +func (s *testIntegrationSuite7) TestPrimaryKey(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("drop database if exists test_primary_key;") tk.MustExec("create database test_primary_key;") @@ -178,7 +178,7 @@ func (s *testIntegrationSuite9) TestPrimaryKey(c *C) { tk.MustExec("drop table t;") } -func (s *testIntegrationSuite9) TestDropAutoIncrementIndex(c *C) { +func (s *testIntegrationSuite7) TestDropAutoIncrementIndex(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") tk.MustExec("drop table if exists t1") @@ -186,7 +186,7 @@ func (s *testIntegrationSuite9) TestDropAutoIncrementIndex(c *C) { tk.MustExec("alter table t1 drop index a") } -func (s *testIntegrationSuite9) TestMultiRegionGetTableEndHandle(c *C) { +func (s *testIntegrationSuite7) TestMultiRegionGetTableEndHandle(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("drop database if exists test_get_endhandle") tk.MustExec("create database test_get_endhandle") @@ -230,7 +230,7 @@ func (s *testIntegrationSuite9) TestMultiRegionGetTableEndHandle(c *C) { c.Assert(maxHandle, Equals, kv.IntHandle(10000)) } -func (s *testIntegrationSuite9) TestGetTableEndHandle(c *C) { +func (s *testIntegrationSuite7) TestGetTableEndHandle(c *C) { // TestGetTableEndHandle test ddl.GetTableMaxHandle method, which will return the max row id of the table. tk := testkit.NewTestKit(c, s.store) tk.MustExec("drop database if exists test_get_endhandle") @@ -322,7 +322,7 @@ func (s *testIntegrationSuite9) TestGetTableEndHandle(c *C) { c.Assert(emptyTable, IsFalse) } -func (s *testIntegrationSuite9) TestMultiRegionGetTableEndCommonHandle(c *C) { +func (s *testIntegrationSuite7) TestMultiRegionGetTableEndCommonHandle(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("drop database if exists test_get_endhandle") tk.MustExec("create database test_get_endhandle") @@ -367,7 +367,7 @@ func (s *testIntegrationSuite9) TestMultiRegionGetTableEndCommonHandle(c *C) { c.Assert(maxHandle, HandleEquals, MustNewCommonHandle(c, "a", 1, 1)) } -func (s *testIntegrationSuite9) TestGetTableEndCommonHandle(c *C) { +func (s *testIntegrationSuite7) TestGetTableEndCommonHandle(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("drop database if exists test_get_endhandle") tk.MustExec("create database test_get_endhandle") @@ -925,7 +925,7 @@ func (s *testSerialSuite) TestTableLocksEnable(c *C) { checkTableLock(c, tk.Se, "test", "t1", model.TableLockNone) } -func (s *testSerialSuite) TestAutoRandom(c *C) { +func (s *testSerialDBSuite) TestAutoRandom(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("create database if not exists auto_random_db") defer tk.MustExec("drop database if exists auto_random_db") @@ -1146,7 +1146,7 @@ func (s *testSerialSuite) TestAutoRandom(c *C) { }) } -func (s *testIntegrationSuite9) TestAutoRandomChangeFromAutoInc(c *C) { +func (s *testIntegrationSuite7) TestAutoRandomChangeFromAutoInc(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test;") tk.MustExec("set @@tidb_allow_remove_auto_inc = 1;") @@ -1202,7 +1202,7 @@ func (s *testIntegrationSuite9) TestAutoRandomChangeFromAutoInc(c *C) { tk.MustExec("alter table t modify column a bigint auto_random(4);") } -func (s *testIntegrationSuite9) TestAutoRandomExchangePartition(c *C) { +func (s *testIntegrationSuite7) TestAutoRandomExchangePartition(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("create database if not exists auto_random_db") defer tk.MustExec("drop database if exists auto_random_db") @@ -1236,7 +1236,7 @@ func (s *testIntegrationSuite9) TestAutoRandomExchangePartition(c *C) { tk.MustQuery("select count(*) from e4").Check(testkit.Rows("4")) } -func (s *testIntegrationSuite9) TestAutoRandomIncBitsIncrementAndOffset(c *C) { +func (s *testIntegrationSuite7) TestAutoRandomIncBitsIncrementAndOffset(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("create database if not exists auto_random_db") defer tk.MustExec("drop database if exists auto_random_db") @@ -1388,7 +1388,7 @@ func (s *testSerialSuite) TestForbidUnsupportedCollations(c *C) { // mustGetUnsupportedCollation("alter table t convert to collate utf8mb4_unicode_ci", "utf8mb4_unicode_ci") } -func (s *testIntegrationSuite9) TestInvisibleIndex(c *C) { +func (s *testIntegrationSuite7) TestInvisibleIndex(c *C) { tk := testkit.NewTestKit(c, s.store) tk.MustExec("use test") @@ -1464,7 +1464,7 @@ func (s *testIntegrationSuite9) TestInvisibleIndex(c *C) { c.Check(len(res.Rows()), Equals, 1) } -func (s *testIntegrationSuite9) TestCreateClusteredIndex(c *C) { +func (s *testIntegrationSuite7) TestCreateClusteredIndex(c *C) { tk := testkit.NewTestKitWithInit(c, s.store) tk.Se.GetSessionVars().EnableClusteredIndex = variable.ClusteredIndexDefModeOn tk.MustExec("CREATE TABLE t1 (a int primary key, b int)") @@ -1515,7 +1515,7 @@ func (s *testIntegrationSuite9) TestCreateClusteredIndex(c *C) { c.Assert(tbl.Meta().IsCommonHandle, IsFalse) } -func (s *testSerialSuite) TestCreateTableNoBlock(c *C) { +func (s *testSerialDBSuite) TestCreateTableNoBlock(c *C) { tk := testkit.NewTestKitWithInit(c, s.store) c.Assert(failpoint.Enable("github.com/pingcap/tidb/ddl/checkOwnerCheckAllVersionsWaitTime", `return(true)`), IsNil) defer func() {