Skip to content

Commit

Permalink
Add extra check for protocol-out-of-sync problems
Browse files Browse the repository at this point in the history
  • Loading branch information
johto committed Jul 23, 2015
1 parent dc50b6a commit 89d2f24
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand Down

0 comments on commit 89d2f24

Please sign in to comment.