Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/query: must reset buf in Do. #422

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions query.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@
if err != nil {
return errors.Wrap(err, "progress")
}
c.metricsInc(ctx, queryMetrics{Rows: int(p.Rows), Bytes: int(p.Bytes)})

Check failure on line 451 in query.go

View workflow job for this annotation

GitHub Actions / lint / run

G115: integer overflow conversion uint64 -> int (gosec)
if ce := c.lg.Check(zap.DebugLevel, "Progress"); ce != nil {
ce.Write(
zap.Uint64("rows", p.Rows),
Expand Down Expand Up @@ -572,6 +572,7 @@

// Do performs Query on ClickHouse server.
func (c *Client) Do(ctx context.Context, q Query) (err error) {
defer c.buf.Reset() // reset buf.
if c.IsClosed() {
return ErrClosed
}
Expand Down
Loading