You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mysql): validate parameter count for prepared statements (#3857)
* fix(mysql): validate parameter count for prepared statements
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.
* refactor(mysql): use err_protocol macro for error creation
Replace direct Error::Protocol(format!()) calls with err_protocol!
macro in MySQL connection executor.
* test(mysql): add parameter count validation tests
- Add test for too few parameters provided to query
- Add test for too many parameters provided to query
- Add test for parameters provided when none expected
- All tests verify Error::Protocol is returned for mismatches
Covers cases for issue #3774 parameter validation fix.
0 commit comments