summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/lib/pq/conn.go
diff options
context:
space:
mode:
Diffstat (limited to 'Godeps/_workspace/src/github.com/lib/pq/conn.go')
-rw-r--r--Godeps/_workspace/src/github.com/lib/pq/conn.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/Godeps/_workspace/src/github.com/lib/pq/conn.go b/Godeps/_workspace/src/github.com/lib/pq/conn.go
index ce661d66e..4af880fb5 100644
--- a/Godeps/_workspace/src/github.com/lib/pq/conn.go
+++ b/Godeps/_workspace/src/github.com/lib/pq/conn.go
@@ -557,13 +557,15 @@ func (cn *conn) simpleQuery(q string) (res *rows, err error) {
cn.bad = true
errorf("unexpected message %q in simple query execution", t)
}
- res = &rows{
- cn: cn,
- colNames: st.colNames,
- colTyps: st.colTyps,
- colFmts: st.colFmts,
- done: true,
+ if res == nil {
+ res = &rows{
+ cn: cn,
+ colNames: st.colNames,
+ colTyps: st.colTyps,
+ colFmts: st.colFmts,
+ }
}
+ res.done = true
case 'Z':
cn.processReadyForQuery(r)
// done