Skip to content

Commit

Permalink
util/testkit/testkit.go: fix typo (#30638)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiearc authored Dec 14, 2021
1 parent a8ad203 commit dd7f71f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions util/testkit/testkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (tk *TestKit) HasPlan(sql string, plan string, args ...interface{}) bool {
return false
}

func containGloabl(rs *Result) bool {
func containGlobal(rs *Result) bool {
partitionNameCol := 2
for i := range rs.rows {
if strings.Contains(rs.rows[i][partitionNameCol], "global") {
Expand All @@ -272,13 +272,13 @@ func containGloabl(rs *Result) bool {

// MustNoGlobalStats checks if there is no global stats.
func (tk *TestKit) MustNoGlobalStats(table string) bool {
if containGloabl(tk.MustQuery("show stats_meta where table_name like '" + table + "'")) {
if containGlobal(tk.MustQuery("show stats_meta where table_name like '" + table + "'")) {
return false
}
if containGloabl(tk.MustQuery("show stats_buckets where table_name like '" + table + "'")) {
if containGlobal(tk.MustQuery("show stats_buckets where table_name like '" + table + "'")) {
return false
}
if containGloabl(tk.MustQuery("show stats_histograms where table_name like '" + table + "'")) {
if containGlobal(tk.MustQuery("show stats_histograms where table_name like '" + table + "'")) {
return false
}
return true
Expand Down

0 comments on commit dd7f71f

Please sign in to comment.