Skip to content

Commit

Permalink
Merge pull request #58210 from RaduBerinde/fetcher-crash
Browse files Browse the repository at this point in the history
release-20.2: sql: safeguard against nil fetcher in GetBytesRead
  • Loading branch information
RaduBerinde authored Dec 24, 2020
2 parents e90d2bf + d3d4c03 commit 49115ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/sql/row/kv_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ func newKVFetcher(batchFetcher kvBatchFetcher) *KVFetcher {

// GetBytesRead returns the number of bytes read by this fetcher.
func (f *KVFetcher) GetBytesRead() int64 {
if f == nil {
return 0
}
return f.bytesRead
}

Expand Down

0 comments on commit 49115ed

Please sign in to comment.