Commit 86092b3d authored by Michael Lewis's avatar Michael Lewis Committed by Brad Fitzpatrick

sql: Propagate error from subsetTypeArgs in Exec

Fixes #3449

R=golang-dev
CC=bradfitz, golang-dev
https://golang.org/cl/5970076
parent 7a33265c
......@@ -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)
......
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