summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/lib
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-26 09:02:00 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-26 09:02:00 -0500
commit006fc61ecce1ba3d5c7b7163309467c24edbbc46 (patch)
tree533f5dcd094ebd94d425e64a4261b7b21ec6f3fa /Godeps/_workspace/src/github.com/lib
parentaaced173f8b3020fbbef236d84b070c2c67ee968 (diff)
parent2639452967e66c4840164c36817234d3e7c12ac1 (diff)
downloadchat-006fc61ecce1ba3d5c7b7163309467c24edbbc46.tar.gz
chat-006fc61ecce1ba3d5c7b7163309467c24edbbc46.tar.bz2
chat-006fc61ecce1ba3d5c7b7163309467c24edbbc46.zip
Merge pull request #1505 from mattermost/lib-upgrade
Lib upgrade
Diffstat (limited to 'Godeps/_workspace/src/github.com/lib')
-rw-r--r--Godeps/_workspace/src/github.com/lib/pq/.travis.yml1
-rw-r--r--Godeps/_workspace/src/github.com/lib/pq/buf.go1
-rw-r--r--Godeps/_workspace/src/github.com/lib/pq/conn.go12
-rw-r--r--Godeps/_workspace/src/github.com/lib/pq/copy.go9
4 files changed, 18 insertions, 5 deletions
diff --git a/Godeps/_workspace/src/github.com/lib/pq/.travis.yml b/Godeps/_workspace/src/github.com/lib/pq/.travis.yml
index 9bf683730..6b8eb405b 100644
--- a/Godeps/_workspace/src/github.com/lib/pq/.travis.yml
+++ b/Godeps/_workspace/src/github.com/lib/pq/.travis.yml
@@ -5,6 +5,7 @@ go:
- 1.2
- 1.3
- 1.4
+ - 1.5
- tip
before_install:
diff --git a/Godeps/_workspace/src/github.com/lib/pq/buf.go b/Godeps/_workspace/src/github.com/lib/pq/buf.go
index e7ff57771..666b0012a 100644
--- a/Godeps/_workspace/src/github.com/lib/pq/buf.go
+++ b/Godeps/_workspace/src/github.com/lib/pq/buf.go
@@ -21,6 +21,7 @@ func (b *readBuf) oid() (n oid.Oid) {
return
}
+// N.B: this is actually an unsigned 16-bit integer, unlike int32
func (b *readBuf) int16() (n int) {
n = int(binary.BigEndian.Uint16(*b))
*b = (*b)[2:]
diff --git a/Godeps/_workspace/src/github.com/lib/pq/conn.go b/Godeps/_workspace/src/github.com/lib/pq/conn.go
index 40a630d74..ce661d66e 100644
--- a/Godeps/_workspace/src/github.com/lib/pq/conn.go
+++ b/Godeps/_workspace/src/github.com/lib/pq/conn.go
@@ -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
diff --git a/Godeps/_workspace/src/github.com/lib/pq/copy.go b/Godeps/_workspace/src/github.com/lib/pq/copy.go
index e44fa48a5..101f11133 100644
--- a/Godeps/_workspace/src/github.com/lib/pq/copy.go
+++ b/Godeps/_workspace/src/github.com/lib/pq/copy.go
@@ -215,9 +215,7 @@ func (ci *copyin) Exec(v []driver.Value) (r driver.Result, err error) {
}
if len(v) == 0 {
- err = ci.Close()
- ci.closed = true
- return nil, err
+ return nil, ci.Close()
}
numValues := len(v)
@@ -240,9 +238,10 @@ func (ci *copyin) Exec(v []driver.Value) (r driver.Result, err error) {
}
func (ci *copyin) Close() (err error) {
- if ci.closed {
- return errCopyInClosed
+ if ci.closed { // Don't do anything, we're already closed
+ return nil
}
+ ci.closed = true
if ci.cn.bad {
return driver.ErrBadConn