pt-show-grants output for users based on MySQL roles could not be played on MySQL server.
How to reproduce:
I have created Role, User, and attach the role to user. Everything looks fine from the user perspective.
Try to drop the user and recreate it from pt-show grants output:
The problem is in 'DEFAULT ROLE `test`@`%`. If I remove it no problem with restoring the user, but till I execute 'set default role....' user can't work.
pt-show-grants output for users based on MySQL roles could not be played on MySQL server.
How to reproduce:
I have created Role, User, and attach the role to user. Everything looks fine from the user perspective.
Try to drop the user and recreate it from pt-show grants output:
The problem is in 'DEFAULT ROLE `test`@`%`. If I remove it no problem with restoring the user, but till I execute 'set default role....' user can't work.
Checked on Percona server with pt-tool versions:
As I understand from official MySQL docs (https://dev.mysql.com/doc/refman/8.0/en/alter-user.html#alter-user-role) `alter user default role` command should be execute separately from other changes, and probably after roles granted to user.