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

util/testkit/testkit.go: fix typo #30638

Merged
merged 11 commits into from
Dec 14, 2021
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