worryg0d commented on code in PR #1822:
URL:
https://github.com/apache/cassandra-gocql-driver/pull/1822#discussion_r1805046159
##########
frame.go:
##########
@@ -1556,8 +1578,18 @@ func (f *framer) writeQueryParams(opts *queryParams) {
}
if opts.keyspace != "" {
+ if f.proto < protoVersion5 {
+ panic(fmt.Errorf("the keyspace can only be set with
protocol 5 or higher"))
+ }
f.writeString(opts.keyspace)
}
+
+ if opts.nowInSeconds != nil {
+ if f.proto < protoVersion5 {
+ panic(fmt.Errorf("now_in_seconds can only be set with
protocol 5 or higher"))
+ }
+ f.writeInt(int32(*opts.nowInSeconds))
Review Comment:
Very good catch! Somehow it didn't occur to me... I added a little fix for
this one.
We probably should do the same for other fields.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]