go/src/pkg/database/sql
Brad Fitzpatrick 3297fc63d6 database/sql: fix double connection free on Stmt.Query error
In a transaction, on a Stmt.Query error, it was possible for a
connection to be added to a db's freelist twice. Should use
the local releaseConn function instead.

Thanks to Gwenael Treguier for the failing test.

Also in this CL: propagate driver errors through releaseConn
into *DB.putConn, which conditionally ignores the freelist
addition if the driver signaled ErrBadConn, introduced in a
previous CL.

R=golang-dev, gary.burd
CC=golang-dev
https://golang.org/cl/5798049
2012-03-10 10:00:02 -08:00
..
driver database/sql{,driver}: add ErrBadConn 2012-03-08 10:09:52 -08:00
convert.go database/sql/driver: API cleanups 2012-02-20 14:25:28 +11:00
convert_test.go database/sql: treat pointers as nullable types like encoding/json 2012-02-08 17:14:15 +11:00
doc.txt
fakedb_test.go database/sql: fix double connection free on Stmt.Query error 2012-03-10 10:00:02 -08:00
sql.go database/sql: fix double connection free on Stmt.Query error 2012-03-10 10:00:02 -08:00
sql_test.go database/sql: fix double connection free on Stmt.Query error 2012-03-10 10:00:02 -08:00