diff options
author | =Corey Hulen <corey@hulen.com> | 2015-11-23 15:53:48 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-11-23 15:53:48 -0800 |
commit | 4f4cd5e63573da4d6edcc7d4213afaca67c19f88 (patch) | |
tree | cefbc7af53629d97644ca2f6b2369e9d879f0101 /Godeps/_workspace/src/github.com/lib/pq/conn.go | |
parent | f8a3c9a14edca6df0647d89cf225f2470cbe025c (diff) | |
download | chat-4f4cd5e63573da4d6edcc7d4213afaca67c19f88.tar.gz chat-4f4cd5e63573da4d6edcc7d4213afaca67c19f88.tar.bz2 chat-4f4cd5e63573da4d6edcc7d4213afaca67c19f88.zip |
upgrading libs
Diffstat (limited to 'Godeps/_workspace/src/github.com/lib/pq/conn.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/lib/pq/conn.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Godeps/_workspace/src/github.com/lib/pq/conn.go b/Godeps/_workspace/src/github.com/lib/pq/conn.go index 40a630d74..7b9aa5dc9 100644 --- a/Godeps/_workspace/src/github.com/lib/pq/conn.go +++ b/Godeps/_workspace/src/github.com/lib/pq/conn.go @@ -22,7 +22,7 @@ import ( "time" "unicode" - "github.com/lib/pq/oid" + "github.com/mattermost/platform/Godeps/_workspace/src/github.com/lib/pq/oid" ) // Common error types @@ -1369,6 +1369,10 @@ func (rs *rows) Next(dest []driver.Value) (err error) { return io.EOF case 'D': n := rs.rb.int16() + if err != nil { + conn.bad = true + errorf("unexpected DataRow after error %s", err) + } if n < len(dest) { dest = dest[:n] } @@ -1622,6 +1626,10 @@ func (cn *conn) readExecuteResponse(protocolState string) (res driver.Result, co t, r := cn.recv1() switch t { case 'C': + if err != nil { + cn.bad = true + errorf("unexpected CommandComplete after error %s", err) + } res, commandTag = cn.parseComplete(r.string()) case 'Z': cn.processReadyForQuery(r) @@ -1629,6 +1637,10 @@ func (cn *conn) readExecuteResponse(protocolState string) (res driver.Result, co case 'E': err = parseError(r) case 'T', 'D', 'I': + if err != nil { + cn.bad = true + errorf("unexpected %q after error %s", t, err) + } // ignore any results default: cn.bad = true |