Skip to content

Commit

Permalink
fix a data race
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao committed Jul 11, 2019
1 parent 434df76 commit bdae5b0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions executor/simple_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,19 @@ func (s *testFlushSuite) TestFlushPrivilegesPanic(c *C) {
c.Assert(err, IsNil)
defer store.Close()

config.GetGlobalConfig().Security.SkipGrantTable = true
saveConf := config.GetGlobalConfig()
conf := config.NewConfig()
conf.Security.SkipGrantTable = true
config.StoreGlobalConfig(conf)

dom, err := session.BootstrapSession(store)
c.Assert(err, IsNil)
defer dom.Close()

tk := testkit.NewTestKit(c, store)
tk.MustExec("FLUSH PRIVILEGES")
config.GetGlobalConfig().Security.SkipGrantTable = false

config.StoreGlobalConfig(saveConf)
}

func (s *testSuite3) TestDropStats(c *C) {
Expand Down

0 comments on commit bdae5b0

Please sign in to comment.