[MDEV-17655] Inconsistent grant-name usage between grant-statement and privilege tables Created: 2018-11-09 Updated: 2019-08-19 Resolved: 2019-05-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System, Versioned Tables |
| Affects Version/s: | 10.3.9, 10.3 |
| Fix Version/s: | 10.3.15, 10.4.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Reinder Cuperus | Assignee: | Aleksey Midenkov |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
In MariaDB 10.3.9 the Privilege_Type returned from INFORMATION_SCHEMA.SCHEMA_PRIVILEGES is different for the new privilege type DELETE VERSIONING ROWS from the allowed grants in grant/revoke statements. Example:
We have some in-house scripting which compares the granted rights in the database with a config, and produces grant/revoke-statements when things are different. At this moment it cannot use the produced grants to automatically generate revoke-statements for DELETE VERSIONING ROWS. Neither can it confirm that DELETE HISTORY has been granted. Proposal for fix:
|
| Comments |
| Comment by Elena Stepanova [ 2018-11-09 ] | ||
|
I don't know whether we can add a privilege type (or a synonym) to a post-GA version. serg, krizhanovsky, opinions? It should, however, be possible to change the privilege type which SHOW GRANTS returns from the invalid one DELETE VERSIONING ROWS to DELETE HISTORY. | ||
| Comment by Sergei Golubchik [ 2018-11-10 ] | ||
|
my opinion: fix SHOW GRANTS to print the correct privilege name | ||
| Comment by Maurice Makaay [ 2019-01-18 ] | ||
|
The ansible mysql_user module also fails because of this discrepancy. The error message that I end up with in Ansible is: In my case, I was able to work-around the issue in Ansible by using the following: {{- name: Create some database user Of course this work-around changes the actual functionality, but in my case that is not an issue (since the user that is created is a super user anyway, and no rights have to be revoked from a sync operation therefore). | ||
| Comment by Marc Olzheim [ 2019-04-11 ] | ||
|
The same thing fails for the puppetlabs-mysql module.
|