Skip to content

Commit

Permalink
fix: recive block without rows
Browse files Browse the repository at this point in the history
  • Loading branch information
kshvakov committed Nov 6, 2017
1 parent d1203a3 commit 81a24df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rows.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ func (rows *rows) Next(dest []driver.Value) error {
return err
}
return io.EOF
case block.NumRows == 0:
return io.EOF
default:
rows.block = block
rows.offset = 0
Expand Down Expand Up @@ -120,6 +118,9 @@ func (rows *rows) receiveData() error {
return rows.setError(err)
}
rows.ch.logf("[rows] <- data: packet=%d, columns=%d, rows=%d, elapsed=%s", packet, block.NumColumns, block.NumRows, time.Since(begin))
if block.NumRows == 0 {
continue
}
switch packet {
case protocol.ServerData:
rows.stream <- block
Expand Down

0 comments on commit 81a24df

Please sign in to comment.