Commit 309eae19 authored by James David Chalfant's avatar James David Chalfant Committed by Brad Fitzpatrick

database/sql: Alter *DB.begin to return driver.ErrBadConn when…

    database/sql: Alter *DB.begin to return driver.ErrBadConn when driver.Conn.Begin returns driver.ErrBadConn
Fixes #4433

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6845094
parent 7571d23c
......@@ -426,7 +426,7 @@ func (db *DB) begin() (tx *Tx, err error) {
txi, err := ci.Begin()
if err != nil {
db.putConn(ci, err)
return nil, fmt.Errorf("sql: failed to Begin transaction: %v", err)
return nil, err
}
return &Tx{
db: db,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment