Skip to content

Commit e7a07be

Browse files
committed
BUG#29115406: CONTRIBUTION - FIX RECV COMPRESS BUG
When switching to compressed mode while using the pure python implementation, there is a bug where a compressed packet may contain an incomplete MySQL packet at last. The bug report does not say much about the issue and does not even provide a test case that proves it, however, we managed to find the bug the contributor means while developing the WL#15591 (improve the network module) where the low-level network communication code was refactored. This patch updates the test case previously implemented in WL#15591 to check the issue so that the test payload sizes do not surpass the default configuration of `max_allowed_packet` for a common MySQL server setup. Thanks, Allen Long for the contribution. Change-Id: I99a90538553b49aa7c0737c7999cbe5b281d5fd3
1 parent 79db158 commit e7a07be

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ v8.1.0
1919
- BUG#35338384: PIP installs incompatible Connector/Python packages
2020
- BUG#35318413: Fix charset mapping for MySQL 8.1.0
2121
- BUG#35212199: Check for identifier quotes in the database name
22+
- BUG#29115406: CONTRIBUTION - FIX RECV COMPRESS BUG
2223

2324
v8.0.33
2425
=======

tests/test_bugs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7478,7 +7478,7 @@ def compressed_packet_incomplete_at_last(self):
74787478
input_sizes = [
74797479
network.MAX_PAYLOAD_LENGTH - 303,
74807480
(network.MAX_PAYLOAD_LENGTH * 2) + 2,
7481-
network.MAX_PAYLOAD_LENGTH * 10,
7481+
network.MAX_PAYLOAD_LENGTH * 3,
74827482
]
74837483
with self.cnx.cursor() as cur:
74847484
for input_size in input_sizes:

0 commit comments

Comments
 (0)