[MDEV-32941] I_S.USER_PRIVILEGES has a wrong name and does not show roles Created: 2023-12-04  Updated: 2023-12-04

Status: Open
Project: MariaDB Server
Component/s: Authentication and Privilege System, Information Schema
Affects Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-24486 Easier way to retrieve all users that... Closed

 Description   

INFORMATION_SCHEMA has tables COLUMN_PRIVILEGES, TABLE_PRIVILEGES, SCHEMA_PRIVILEGES — they show all users and roles that have privileges on specific objects — columns, tables, or schemas.

Also, it has a table USER_PRIVILEGES — unlike other tables it does not show show privileges on specific users, it shows privileges that specific users have on the global level. And it does not include roles.

Ideally, it should be renamed to GLOBAL_PRIVILEGES and should include both users and roles. Also, ideally, USER_PRIVILEGES would show privileges on users (that is PROXY privilege). But we likely cannot rename the table that existed for 20 years.

So, we either

  • add a new table, GLOBAL_PRIVILEGES that shows both users and roles, or
  • add roles to USER_PRIVILEGES

Generated at Thu Feb 08 10:35:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.