diff --git a/server/server_test.go b/server/server_test.go index 88f3045b17086..57179c4c091dd 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -677,16 +677,21 @@ func runTestLoadData(c *C, server *Server) { } func runTestConcurrentUpdate(c *C) { - // TODO: Should be runTestsOnNewDB. See #4205. - runTests(c, nil, func(dbt *DBTest) { + dbName := "Concurrent" + runTestsOnNewDB(c, nil, dbName, func(dbt *DBTest) { dbt.mustExec("drop table if exists test2") dbt.mustExec("create table test2 (a int, b int)") dbt.mustExec("insert test2 values (1, 1)") + txn1, err := dbt.db.Begin() c.Assert(err, IsNil) + _, err = txn1.Exec(fmt.Sprintf("USE `%s`;", dbName)) + c.Assert(err, IsNil) txn2, err := dbt.db.Begin() c.Assert(err, IsNil) + _, err = txn2.Exec(fmt.Sprintf("USE `%s`;", dbName)) + c.Assert(err, IsNil) _, err = txn2.Exec("update test2 set a = a + 1 where b = 1") c.Assert(err, IsNil)