Skip to content

Commit

Permalink
[release-branch.go1] sql: Propagate error from subsetTypeArgs in Exec
Browse files Browse the repository at this point in the history
««« backport dd8f13acda2e
sql: Propagate error from subsetTypeArgs in Exec

Fixes #3449

R=golang-dev
CC=bradfitz, golang-dev
https://golang.org/cl/5970076

»»»
  • Loading branch information
mikelikespie authored and bradfitz committed Apr 3, 2012
1 parent 02c38a8 commit ca24622
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pkg/database/sql/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ func (db *DB) prepare(query string) (stmt *Stmt, err error) {
// Exec executes a query without returning any rows.
func (db *DB) Exec(query string, args ...interface{}) (Result, error) {
sargs, err := subsetTypeArgs(args)
if err != nil {
return nil, err
}
var res Result
for i := 0; i < 10; i++ {
res, err = db.exec(query, sargs)
Expand Down

0 comments on commit ca24622

Please sign in to comment.