From bdae5b0c8ce946b5b704a1831d411323d45c3940 Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Thu, 11 Jul 2019 14:59:41 +0800 Subject: [PATCH] fix a data race --- executor/simple_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/executor/simple_test.go b/executor/simple_test.go index 440224cc494e5..0de9f78d714a0 100644 --- a/executor/simple_test.go +++ b/executor/simple_test.go @@ -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) {