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

Return OK to statements without executing them #1045

Closed
renecannao opened this issue Jun 12, 2017 · 1 comment
Closed

Return OK to statements without executing them #1045

renecannao opened this issue Jun 12, 2017 · 1 comment

Comments

@renecannao
Copy link
Contributor

mysql_query_rules has already an option to filter queries returning an error if error_msg is set.

Sometime filtering queries returning an error is not the best option as the client will error if it get an error. For this reason would be better to return an OK message without executing any query to the backend.

Few examples:

@renecannao renecannao self-assigned this Jun 12, 2017
renecannao added a commit that referenced this issue Jun 17, 2017
Extending mysql_query_rules with a new field: OK_msg

If OK_msg is not NULL, an OK packet is sent to the client with an optional
message as specified in OK_msg itself.
If OK_msg is an not NULL empty string, an OK packet is sent to the client
without any message.
If both error_msg and OK_msg are present, error_msg is returned.

This commit includes also few minor bugs, mostly related to typo that would
prevent online upgrade of mysql_query_rules from early release of 1.4.0 .
@renecannao renecannao added this to the v1.4.1 milestone Jul 19, 2017
@renecannao
Copy link
Contributor Author

Implemented in 1.4.1

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

No branches or pull requests

1 participant