From 48eacd90a8ad54baf8c8037cb8d753e31e2d4bfd Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 6 Mar 2012 14:10:58 -0800 Subject: database/sql: fix typo bug resulting in double-Prepare Bug reported by Blake Mizerany found while writing his new Postgres driver. R=golang-dev, blake.mizerany CC=golang-dev https://golang.org/cl/5754057 --- src/pkg/database/sql/sql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pkg/database/sql/sql.go') diff --git a/src/pkg/database/sql/sql.go b/src/pkg/database/sql/sql.go index 62b551d89b..f50daa11a1 100644 --- a/src/pkg/database/sql/sql.go +++ b/src/pkg/database/sql/sql.go @@ -700,7 +700,7 @@ func (s *Stmt) connStmt() (ci driver.Conn, releaseConn func(), si driver.Stmt, e for _, v := range s.css { // TODO(bradfitz): lazily clean up entries in this // list with dead conns while enumerating - if _, match = s.db.connIfFree(cs.ci); match { + if _, match = s.db.connIfFree(v.ci); match { cs = v break } -- cgit v1.3