Skip to content

Commit

Permalink
handle empty results
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <andres@planetscale.com>
  • Loading branch information
systay committed Sep 16, 2024
1 parent 4cbf3c5 commit b4bc162
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion go/vt/vtgate/vcursor_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,11 @@ func (vc *vcursorImpl) logOpTraffic(primitive engine.Primitive, res *sqltypes.Re
if vc.primitiveStats != nil {
key := int(primitive.GetID())
rows := vc.primitiveStats[key]
rows = append(rows, len(res.Rows))
if res == nil {
rows = append(rows, 0)
} else {
rows = append(rows, len(res.Rows))
}
vc.primitiveStats[key] = rows
}
}
Expand Down

0 comments on commit b4bc162

Please sign in to comment.