fix: correct length-coded number size for the 3-byte range - #4500
Merged
sidorares merged 2 commits intoAug 24, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4500 +/- ##
=======================================
Coverage 92.53% 92.53%
=======================================
Files 93 93
Lines 15972 15972
Branches 2290 2290
=======================================
Hits 14780 14780
Misses 1192 1192
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Owner
Owner
|
@lazerg fix published as mysql@3.24.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Packet.lengthCodedNumberLength()returns 5 for the0xffff <= n < 0xffffffrange, butwriteLengthCodedNumber()only ever writes 4 bytes there (a 1-byte0xfdmarker plus a 3-byte Int24). Before #4494, packet sizes were measured with a real dry-run write, so this drift never surfaced. Since #4494 switched to computing sizes arithmetically fromlengthCodedNumberLength(), any string/JSON/blob parameter whose encoded length falls in that range now throwsCOM_STMT_EXECUTE serialized N bytes, expected N+1. This fixes the length function to match what the writer actually emits.Fixes #4499