Skip to content

Commit

Permalink
fix: return error if params are not supported, but provided
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Aug 21, 2022
1 parent 3a72bb3 commit 6ad136b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions query.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,11 @@ func (c *Client) Do(ctx context.Context, q Query) (err error) {
if c.conn == nil {
return ErrClosed
}
if len(q.Parameters) > 0 && !proto.FeatureParameters.In(c.protocolVersion) {
return errors.Errorf("query parameters are not supported in protocol version %d, upgrade server %q",
c.protocolVersion, c.server,
)
}
if q.QueryID == "" {
q.QueryID = uuid.New().String()
}
Expand Down

0 comments on commit 6ad136b

Please sign in to comment.