Skip to content

fix(mysql): validate parameter count for prepared statements #3857

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

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

Conversation

cvzx
Copy link

@cvzx cvzx commented May 14, 2025

Does your PR solve an issue?

fixes #3774

Is this a breaking change?

No. This PR adds proper error handling when the number of parameters provided doesn't match the number expected by a prepared statement in MySQL.

@cvzx cvzx force-pushed the fix/issue-3774-param-validation branch from 1d2eba4 to b1caf01 Compare May 14, 2025 02:22
Add validation to ensure the number of provided parameters matches the
expected count for MySQL prepared statements.
This prevents protocol errors by returning an error if the counts do not match before sending
the statement for execution.
@cvzx cvzx force-pushed the fix/issue-3774-param-validation branch from b1caf01 to 149a36c Compare May 14, 2025 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MySQL query returns "(1835) Malformed communication packet."
1 participant