fix: remove unneeded flush privileges call for mysql #141 #147
Closed
mariusziemke wants to merge 4 commits into
Closed
fix: remove unneeded flush privileges call for mysql #141 #147mariusziemke wants to merge 4 commits into
mariusziemke wants to merge 4 commits into
Conversation
Signed-off-by: Marius Ziemke <marius@ziemke.net>
Contributor
Author
|
Hi, can anyone look into this PR? Thanks! |
|
We are interested on this fix because we have issue with our percona xtradb cluster witch can be stuck because of |
Contributor
|
Also interested for having this merged for the next release, thanks in advance. |
Member
|
Would you mind rebasing? |
8ee68b5 to
02eba1d
Compare
Signed-off-by: Marius Ziemke <marius@ziemke.net>
Contributor
Author
|
@Duologic done. |
Member
|
Ah sorry, missed that this would conflict with #171, this might even simplify it more. |
Member
|
Merged in #202 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
Fixes #141
According to mysql documentation executing FLUSH PRIVILEGES is only required If you modify the grant tables directly using statements such as INSERT, UPDATE, or DELETE (which is not recommended), the changes have no effect on privilege checking until you either tell the server to reload the tables or restart it. (dev.mysql.com/doc/refman/8.0/en/privilege-changes.html). Other references:
stackoverflow.com/questions/36463966/mysql-when-is-flush-privileges-in-mysql-really-needed
docs.pingcap.com/tidb/dev/sql-statement-flush-privileges
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
The change has been running in our various dev and production environments for a few weeks now. We tried to break our database clusters by adding and removing lots of users concurrently and everything works as expected. Before removing the Flush Privileges call we had a lot of trouble in our replicated db setup which tried to protect itself from inconsistency by just shutting down after adding more then one user at the same time.