diff --git a/src/MySQLReplication/JsonBinaryDecoder/JsonBinaryDecoderService.php b/src/MySQLReplication/JsonBinaryDecoder/JsonBinaryDecoderService.php index d669ef4..02cfd2d 100644 --- a/src/MySQLReplication/JsonBinaryDecoder/JsonBinaryDecoderService.php +++ b/src/MySQLReplication/JsonBinaryDecoder/JsonBinaryDecoderService.php @@ -281,6 +281,8 @@ private function parseScalar(int $type): JsonBinaryDecoderValue $data = $this->binaryDataReader->readInt64(); } elseif ($type === self::UINT16) { $data = ($this->binaryDataReader->readUInt16()); + } elseif ($type === self::UINT32) { + $data = ($this->binaryDataReader->readUInt32()); } elseif ($type === self::UINT64) { $data = ($this->binaryDataReader->readUInt64()); } elseif ($type === self::DOUBLE) { diff --git a/tests/Integration/TypesTest.php b/tests/Integration/TypesTest.php index eb229ea..5fff563 100644 --- a/tests/Integration/TypesTest.php +++ b/tests/Integration/TypesTest.php @@ -726,7 +726,8 @@ public function testShouldBeJson(): void (101, '{\"bool\": true}'), (102, '{\"bool\": false}'), (103, '{\"null\": null}'), - (104, '[\"\\\\\"test\"]') + (104, '[\"\\\\\"test\"]'), + (105, CAST(CAST(4294967295 AS UNSIGNED) AS JSON)) "; $event = $this->createAndInsertValue($create_query, $insert_query); @@ -762,5 +763,6 @@ public function testShouldBeJson(): void self::assertEquals('{"bool":false}', $results[26]['j']); self::assertEquals('{"null":null}', $results[27]['j']); self::assertEquals('["\"test"]', $results[28]['j']); + self::assertEquals('"4294967295"', $results[29]['j']); } }