mysql_user: added flush privileges to write dynamic privs into db

This commit is contained in:
Andrew Klychkov 2022-04-29 16:33:31 +02:00
commit a2d9a65a08
2 changed files with 3 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "mysql_user - fix missing dynamic privileges after revoke and grant privileges to user (https://github.com/ansible-collections/community.mysql/issues/120)."

View file

@ -952,6 +952,7 @@ def privileges_revoke(cursor, user, host, db_table, priv, grant_option):
query.append("FROM %s@%s")
query = ' '.join(query)
cursor.execute(query, (user, host))
cursor.execute("FLUSH PRIVILEGES")
def privileges_grant(cursor, user, host, db_table, priv, tls_requires):