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

executor: fix the data race on TestDataForTableStatsField and TestPartitionsTable #15260

Merged
merged 14 commits into from
Mar 10, 2020
Prev Previous commit
Next Next commit
fmt
  • Loading branch information
reafans committed Mar 10, 2020
commit d4c496536fc43749ffe964acf61624e399276e0c
3 changes: 2 additions & 1 deletion executor/infoschema_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
package executor_test

import (
"github.com/pingcap/tidb/executor"
"strconv"

. "github.com/pingcap/check"
"github.com/pingcap/parser/auth"
"github.com/pingcap/tidb/config"
"github.com/pingcap/tidb/domain"
"github.com/pingcap/tidb/executor"
"github.com/pingcap/tidb/kv"
"github.com/pingcap/tidb/statistics/handle"
"github.com/pingcap/tidb/util/testkit"
Expand Down Expand Up @@ -285,6 +285,7 @@ func (s *testInfoschemaTableSerialSuite) TestDataForTableStatsField(c *C) {
}

func (s *testInfoschemaTableSerialSuite) TestPartitionsTable(c *C) {
s.dom.SetStatsUpdating(true)
oldExpiryTime := executor.TableStatsCacheExpiry
executor.TableStatsCacheExpiry = 0
defer func() { executor.TableStatsCacheExpiry = oldExpiryTime }()
Expand Down