|
30 | 30 | UserAggregateDescriptor, SchemaTargetType) |
31 | 31 | from cassandra.marshal import (int32_pack, int32_unpack, uint16_pack, uint16_unpack, |
32 | 32 | int8_pack, int8_unpack, uint64_pack, header_pack, |
33 | | - v3_header_pack) |
| 33 | + v3_header_pack, uint32_pack) |
34 | 34 | from cassandra.cqltypes import (AsciiType, BytesType, BooleanType, |
35 | 35 | CounterColumnType, DateType, DecimalType, |
36 | 36 | DoubleType, FloatType, Int32Type, |
@@ -561,7 +561,7 @@ def send_body(self, f, protocol_version): |
561 | 561 | flags |= _PROTOCOL_TIMESTAMP |
562 | 562 |
|
563 | 563 | if protocol_version >= 5: |
564 | | - write_int(f, flags) |
| 564 | + write_uint(f, flags) |
565 | 565 | else: |
566 | 566 | write_byte(f, flags) |
567 | 567 |
|
@@ -775,6 +775,9 @@ def __init__(self, query): |
775 | 775 |
|
776 | 776 | def send_body(self, f, protocol_version): |
777 | 777 | write_longstring(f, self.query) |
| 778 | + if protocol_version >= 5: |
| 779 | + # Write the flags byte; with 0 value for now, but this should change in PYTHON-678 |
| 780 | + write_uint(f, 0) |
778 | 781 |
|
779 | 782 |
|
780 | 783 | class ExecuteMessage(_MessageType): |
@@ -829,7 +832,7 @@ def send_body(self, f, protocol_version): |
829 | 832 | flags |= _SKIP_METADATA_FLAG |
830 | 833 |
|
831 | 834 | if protocol_version >= 5: |
832 | | - write_int(f, flags) |
| 835 | + write_uint(f, flags) |
833 | 836 | else: |
834 | 837 | write_byte(f, flags) |
835 | 838 |
|
@@ -1164,6 +1167,10 @@ def write_int(f, i): |
1164 | 1167 | f.write(int32_pack(i)) |
1165 | 1168 |
|
1166 | 1169 |
|
| 1170 | +def write_uint(f, i): |
| 1171 | + f.write(uint32_pack(i)) |
| 1172 | + |
| 1173 | + |
1167 | 1174 | def write_long(f, i): |
1168 | 1175 | f.write(uint64_pack(i)) |
1169 | 1176 |
|
|
0 commit comments