Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
qw4990 committed May 7, 2021
1 parent ba4b18b commit 2096e68
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions statistics/handle/handle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1012,8 +1012,8 @@ func (s *testStatsSuite) TestGlobalStatsData2(c *C) {
tk.MustExec("analyze table tint with 2 topn, 2 buckets")

tk.MustQuery("select modify_count, count from mysql.stats_meta order by table_id asc").Check(testkit.Rows(
"0 20", // global: g.count = p0.count + p1.count
"0 9", // p0
"0 20", // global: g.count = p0.count + p1.count
"0 9", // p0
"0 11")) // p1

tk.MustQuery("show stats_topn where table_name='tint' and is_index=0").Check(testkit.Rows(
Expand Down Expand Up @@ -1043,7 +1043,7 @@ func (s *testStatsSuite) TestGlobalStatsData2(c *C) {

tk.MustQuery("select distinct_count, null_count, tot_col_size from mysql.stats_histograms where is_index=0 order by table_id asc").Check(
testkit.Rows("12 1 19", // global, g = p0 + p1
"5 1 8", // p0
"5 1 8", // p0
"7 0 11")) // p1

tk.MustQuery("show stats_buckets where is_index=1").Check(testkit.Rows(
Expand All @@ -1057,7 +1057,7 @@ func (s *testStatsSuite) TestGlobalStatsData2(c *C) {

tk.MustQuery("select distinct_count, null_count from mysql.stats_histograms where is_index=1 order by table_id asc").Check(
testkit.Rows("12 1", // global, g = p0 + p1
"5 1", // p0
"5 1", // p0
"7 0")) // p1

// double + (column + index with 1 column)
Expand Down Expand Up @@ -2129,6 +2129,7 @@ func (s *testStatsSuite) TestDuplicateFMSketch(c *C) {
tk.MustQuery("select count(*) from mysql.stats_fm_sketch").Check(testkit.Rows("3"))

tk.MustExec("alter table t drop column a")
s.do.StatsHandle().SetLastUpdateVersion(s.do.StatsHandle().LastUpdateVersion() + 1)
c.Assert(s.do.StatsHandle().GCStats(s.do.InfoSchema(), time.Duration(0)), IsNil)
tk.MustQuery("select count(*) from mysql.stats_fm_sketch").Check(testkit.Rows("2"))
}

0 comments on commit 2096e68

Please sign in to comment.