Skip to content

Commit 0b01907

Browse files
Add skip metadata handling in _QueryMessage
This change restores handling of skip_metadata in _QueryMessage, that was removed in 2019 (most likely to prevent metadata inconsistencies in prepared statements). I'm not sure if any other changes are required, as there were many modifications in the codebase since the flag handling was removed.
1 parent 9d76482 commit 0b01907

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cassandra/protocol.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,9 @@ def _write_query_params(self, f, protocol_version):
606606
"Keyspaces may only be set on queries with protocol version "
607607
"5 or DSE_V2 or higher. Consider setting Cluster.protocol_version.")
608608

609+
if self.skip_meta is not None and self.skip_meta:
610+
flags |= _SKIP_METADATA_FLAG
611+
609612
if ProtocolVersion.uses_int_query_flags(protocol_version):
610613
write_uint(f, flags)
611614
else:

0 commit comments

Comments
 (0)