Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix wrong length number write to packet #3177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

remones
Copy link

@remones remones commented Nov 1, 2024

No description provided.

Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.14%. Comparing base (aacf706) to head (2392e3c).
Report is 19 commits behind head on master.

Files with missing lines Patch % Lines
lib/packets/packet.js 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3177   +/-   ##
=======================================
  Coverage   88.13%   88.14%           
=======================================
  Files          71       71           
  Lines       12890    12889    -1     
  Branches     1355     1354    -1     
=======================================
  Hits        11361    11361           
+ Misses       1529     1528    -1     
Flag Coverage Δ
compression-0 88.14% <0.00%> (+<0.01%) ⬆️
compression-1 88.14% <0.00%> (+<0.01%) ⬆️
tls-0 87.56% <0.00%> (+<0.01%) ⬆️
tls-1 87.90% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wellwelwel
Copy link
Collaborator

Hi, @remones 🙋🏻‍♂️

Could you provide some context?
As a fix, do you think a test can be added to cover the issue that is being fixed?

@remones
Copy link
Author

remones commented Nov 7, 2024

Hi, @remones 🙋🏻‍♂️

Could you provide some context? As a fix, do you think a test can be added to cover the issue that is being fixed?

@wellwelwel I'm so sorry, I will provide the test code later.

Please let me explain the issue first: I have a node.js service uses mysql2 to access a MySQL proxy service. When attempting to write a 32MB TEXT field, it raises some errors. we found the reason is that the field length in the MySQL protocol packet read by the proxy far exceeds 32MB. I believe the issue is caused by JavaScript bitwise operations not supporting numbers larger than 32 bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants