mirror of
https://github.com/golang/go
synced 2024-11-18 15:04:44 -07:00
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
This commit is contained in:
parent
7571d23c19
commit
309eae1923
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user