Skip to content

Issue with Cached Procedures and Parameter Mismatch in MySqlConnector #1504

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

Closed
ritwik-singh opened this issue Aug 12, 2024 · 2 comments
Closed

Comments

@ritwik-singh
Copy link

Hi,

I'm currently caching my parameters in .NET, and whenever I update a routine parameter, I ensure to clear the cache. However, I'm encountering an issue where MySqlConnector throws an error stating that "only 6 parameters were required, but 7 were sent."

I suspect this might be related to the cached procedure in MySqlConnector. Could this be the case? If so, is there a way to clear the cached procedure manually, or is it possible to disable this feature altogether, considering that I'm already handling parameter caching within my API?

I appreciate any guidance you can provide on this.

Best Regards,
Ritwik

@bgrainger
Copy link
Member

If so, is there a way to clear the cached procedure manually

I think you can clear the cache by running MySqlConnection.ClearAllPools or MySqlConnection.ClearPool(connection). Does that work around this issue?

is it possible to disable this feature altogether

Possible duplicate of #1175.

@ritwik-singh
Copy link
Author

Hi Bradley,

Thanks for the suggestion! By using MySqlConnection.ClearAllPools, I was able to fix my situation. I appreciate the help.

Best Regards,
Ritwik

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

No branches or pull requests

2 participants