Skip to content

Commit 2b9e734

Browse files
Merge pull request julien-duponchelle#364 from mahadirz/main
To fix ValueError: Json type 96 is not handled
2 parents 4f2d4db + d071c8f commit 2b9e734

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pymysqlreplication/packet.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ def unpack_int32(self, n):
349349

350350
def read_binary_json(self, size):
351351
length = self.read_uint_by_size(size)
352+
if length == 0:
353+
# handle NULL value
354+
return None
352355
payload = self.read(length)
353356
self.unread(payload)
354357
t = self.read_uint8()

0 commit comments

Comments
 (0)