8000 Support disabling stored procedure cache · Issue #1175 · mysql-net/MySqlConnector · GitHub
[go: up one dir, main page]

Skip to content

Support disabling stored procedure cache #1175

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
bgrainger opened this issue May 21, 2022 · 1 comment
Open

Support disabling stored procedure cache #1175

8000 bgrainger opened this issue May 21, 2022 · 1 comment

Comments

@bgrainger
Copy link
Member

Based on #924 and #1174, there are a small number of users who modify stored procedure definitions in the database at runtime; this can be a problem because MySqlConnector caches the procedure definitions and can invoke them with the wrong parameter types or order.

Connector/NET can disable its procedure cache by setting Procedure Cache Size = 0 in the connection string. MySqlConnector doesn't support that option.

We could add Procedure Cache Size and only support zero vs non-zero (to disable or enable caching, respectively), or add a new Use Procedure Cache = false connection string option (default is true) to enable users to opt out.

This might have a significant impact on performance, so it could be worth testing whether it's even an option people would want to use. If it's too slow if caching is disabled, other workarounds (such as clearing the pool to get the side-effect of clearing the procedure cache) might be a better solution anyway.

@bgrainger
Copy link
Member Author

Instead of a connection string option, this could be an AppContext switch, although that would make it global instead of local to a specific connection string.

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

No branches or pull requests

1 participant
0