From a3442a5ab499510227f9b4cea5d5280c6227569a Mon Sep 17 00:00:00 2001 From: Sergey Kurt Date: Fri, 28 Apr 2017 23:58:17 +0300 Subject: [PATCH] Fixed INSERT-SELECT deadlocks in tests --- templates_test/main_test/mssql_main.tpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates_test/main_test/mssql_main.tpl b/templates_test/main_test/mssql_main.tpl index c1c76f2..ba46be7 100644 --- a/templates_test/main_test/mssql_main.tpl +++ b/templates_test/main_test/mssql_main.tpl @@ -68,6 +68,9 @@ func (m *mssqlTester) sslMode(mode string) string { func (m *mssqlTester) createTestDB() error { sql := fmt.Sprintf(` CREATE DATABASE %s; + GO + ALTER DATABASE %[1]s + SET READ_COMMITTED_SNAPSHOT ON; GO`, m.testDBName) return m.runCmd(sql, "sqlcmd", "-S", m.host, "-U", m.user, "-P", m.pass) }