Skip to content

Commit 7ad5f6e

Browse files
committed
fix omission bugs
1 parent 7181d41 commit 7ad5f6e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: connection.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (mc *mysqlConn) Begin() (driver.Tx, error) {
108108
return &mysqlTx{mc}, err
109109
}
110110
if err == errNoWrite {
111-
return driver.ErrBadConn
111+
return nil, driver.ErrBadConn
112112
}
113113
return nil, err
114114
}

Diff for: statement.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (stmt *mysqlStmt) Exec(args []driver.Value) (driver.Result, error) {
4646
err := stmt.writeExecutePacket(args)
4747
if err != nil {
4848
if err == errNoWrite {
49-
return driver.ErrBadConn
49+
return nil, driver.ErrBadConn
5050
}
5151
return nil, err
5252
}
@@ -89,7 +89,7 @@ func (stmt *mysqlStmt) Query(args []driver.Value) (driver.Rows, error) {
8989
err := stmt.writeExecutePacket(args)
9090
if err != nil {
9191
if err == errNoWrite {
92-
return driver.ErrBadConn
92+
return nil, driver.ErrBadConn
9393
}
9494
return nil, err
9595
}

0 commit comments

Comments
 (0)