Send a flags field (value 0) in PREPARE messages in v5.

* Write flags as a 32-bit unsigned int, not int.
This commit is contained in:
Sandeep Tamhankar
2016-12-09 09:10:25 -08:00
parent 94b7820d41
commit f9e4e8e189

View File

@@ -561,7 +561,7 @@ class QueryMessage(_MessageType):
flags |= _PROTOCOL_TIMESTAMP
if protocol_version >= 5:
write_int(f, flags)
write_uint(f, flags)
else:
write_byte(f, flags)
@@ -777,7 +777,7 @@ class PrepareMessage(_MessageType):
write_longstring(f, self.query)
if protocol_version >= 5:
# Write the flags byte; with 0 value for now, but this should change in PYTHON-678
write_int(f, 0)
write_uint(f, 0)
class ExecuteMessage(_MessageType):
@@ -832,7 +832,7 @@ class ExecuteMessage(_MessageType):
flags |= _SKIP_METADATA_FLAG
if protocol_version >= 5:
write_int(f, flags)
write_uint(f, flags)
else:
write_byte(f, flags)
@@ -1167,6 +1167,10 @@ def write_int(f, i):
f.write(int32_pack(i))
def write_uint(f, i):
f.write(uint32_pack(i))
def write_long(f, i):
f.write(uint64_pack(i))