@@ -19,7 +19,11 @@ import (
19
19
"github.com/pingcap/tidb/util/testkit"
20
20
)
21
21
22
- func (s * testSuite1 ) TestShowStatsMeta (c * C ) {
22
+ type testShowStatsSuite struct {
23
+ testSuite
24
+ }
25
+
26
+ func (s * testShowStatsSuite ) TestShowStatsMeta (c * C ) {
23
27
tk := testkit .NewTestKit (c , s .store )
24
28
tk .MustExec ("use test" )
25
29
tk .MustExec ("drop table if exists t, t1" )
@@ -35,7 +39,7 @@ func (s *testSuite1) TestShowStatsMeta(c *C) {
35
39
c .Assert (result .Rows ()[0 ][1 ], Equals , "t" )
36
40
}
37
41
38
- func (s * testSuite1 ) TestShowStatsHistograms (c * C ) {
42
+ func (s * testShowStatsSuite ) TestShowStatsHistograms (c * C ) {
39
43
tk := testkit .NewTestKit (c , s .store )
40
44
tk .MustExec ("use test" )
41
45
tk .MustExec ("drop table if exists t" )
@@ -63,7 +67,7 @@ func (s *testSuite1) TestShowStatsHistograms(c *C) {
63
67
c .Assert (len (res .Rows ()), Equals , 1 )
64
68
}
65
69
66
- func (s * testSuite1 ) TestShowStatsBuckets (c * C ) {
70
+ func (s * testShowStatsSuite ) TestShowStatsBuckets (c * C ) {
67
71
tk := testkit .NewTestKit (c , s .store )
68
72
tk .MustExec ("use test" )
69
73
tk .MustExec ("drop table if exists t" )
@@ -77,7 +81,7 @@ func (s *testSuite1) TestShowStatsBuckets(c *C) {
77
81
result .Check (testkit .Rows ("test t idx 1 0 1 1 (1, 1) (1, 1)" ))
78
82
}
79
83
80
- func (s * testSuite1 ) TestShowStatsHasNullValue (c * C ) {
84
+ func (s * testShowStatsSuite ) TestShowStatsHasNullValue (c * C ) {
81
85
tk := testkit .NewTestKit (c , s .store )
82
86
tk .MustExec ("use test" )
83
87
tk .MustExec ("create table t (a int, index idx(a))" )
@@ -137,7 +141,7 @@ func (s *testSuite1) TestShowStatsHasNullValue(c *C) {
137
141
c .Assert (res .Rows ()[4 ][7 ], Equals , "0" )
138
142
}
139
143
140
- func (s * testSuite1 ) TestShowPartitionStats (c * C ) {
144
+ func (s * testShowStatsSuite ) TestShowPartitionStats (c * C ) {
141
145
tk := testkit .NewTestKit (c , s .store )
142
146
tk .MustExec ("set @@session.tidb_enable_table_partition=1" )
143
147
tk .MustExec ("use test" )
@@ -170,7 +174,7 @@ func (s *testSuite1) TestShowPartitionStats(c *C) {
170
174
result .Check (testkit .Rows ("test t p0 100" ))
171
175
}
172
176
173
- func (s * testSuite1 ) TestShowAnalyzeStatus (c * C ) {
177
+ func (s * testShowStatsSuite ) TestShowAnalyzeStatus (c * C ) {
174
178
tk := testkit .NewTestKit (c , s .store )
175
179
statistics .ClearHistoryJobs ()
176
180
tk .MustExec ("use test" )
0 commit comments