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