aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/sql_test.go
diff options
context:
space:
mode:
authorDaniel Theophanes <kardianos@gmail.com>2017-06-12 11:28:18 -0700
committerDaniel Theophanes <kardianos@gmail.com>2017-06-12 21:58:53 +0000
commit5c37397a471c061fd92a7b9cc799a9c9e66dcd9d (patch)
tree1bcec55542ddbd62e69763eec2f76c5fc1a81f8f /src/database/sql/sql_test.go
parent15b1e4fb94a23c17c594b5e77b3bd81eed880dee (diff)
downloadgo-5c37397a471c061fd92a7b9cc799a9c9e66dcd9d.tar.xz
database/sql: correct level of write to same var for race detector
Rather then write to the same variable per fakeConn, write to either fakeConn or rowsCursor. Fixes #20646 Change-Id: Ifc79f989bd1606b8e3ebecb1e7844cce3ad06e17 Reviewed-on: https://go-review.googlesource.com/45393 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/database/sql/sql_test.go')
-rw-r--r--src/database/sql/sql_test.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/database/sql/sql_test.go b/src/database/sql/sql_test.go
index 9fb17df77e..7895aa0404 100644
--- a/src/database/sql/sql_test.go
+++ b/src/database/sql/sql_test.go
@@ -2995,9 +2995,8 @@ func (c *concurrentRandomTest) init(t testing.TB, db *DB) {
new(concurrentStmtExecTest),
new(concurrentTxQueryTest),
new(concurrentTxExecTest),
- // golang.org/issue/20646
- // new(concurrentTxStmtQueryTest),
- // new(concurrentTxStmtExecTest),
+ new(concurrentTxStmtQueryTest),
+ new(concurrentTxStmtExecTest),
}
for _, ct := range c.tests {
ct.init(t, db)
@@ -3243,9 +3242,8 @@ func TestConcurrency(t *testing.T) {
{"StmtExec", new(concurrentStmtExecTest)},
{"TxQuery", new(concurrentTxQueryTest)},
{"TxExec", new(concurrentTxExecTest)},
- // golang.org/issue/20646
- // {"TxStmtQuery", new(concurrentTxStmtQueryTest)},
- // {"TxStmtExec", new(concurrentTxStmtExecTest)},
+ {"TxStmtQuery", new(concurrentTxStmtQueryTest)},
+ {"TxStmtExec", new(concurrentTxStmtExecTest)},
{"Random", new(concurrentRandomTest)},
}
for _, item := range list {
@@ -3582,7 +3580,6 @@ func BenchmarkConcurrentTxExec(b *testing.B) {
}
func BenchmarkConcurrentTxStmtQuery(b *testing.B) {
- b.Skip("golang.org/issue/20646")
b.ReportAllocs()
ct := new(concurrentTxStmtQueryTest)
for i := 0; i < b.N; i++ {
@@ -3591,7 +3588,6 @@ func BenchmarkConcurrentTxStmtQuery(b *testing.B) {
}
func BenchmarkConcurrentTxStmtExec(b *testing.B) {
- b.Skip("golang.org/issue/20646")
b.ReportAllocs()
ct := new(concurrentTxStmtExecTest)
for i := 0; i < b.N; i++ {