[MDEV-6918] Create a way to see a user's default role Created: 2014-10-23  Updated: 2015-02-24  Resolved: 2015-02-09

Status: Closed
Project: MariaDB Server
Component/s: Admin statements
Fix Version/s: 10.1.3

Type: Task Priority: Major
Reporter: Ian Gilfillan Assignee: Vicențiu Ciorbaru
Resolution: Fixed Votes: 0
Labels: None


 Description   

There is currently no way to see a user's default role besides querying the mysql.user table



 Comments   
Comment by Vicențiu Ciorbaru [ 2015-01-28 ]

After discussing with Sergei and Elena, we have decided to go with the addition of an extra column within INFORMATION_SCHEMA.APPLICABLE_ROLES. The column will be named IS_DEFAULT and feature a YES/NO value accordingly. The information within the INFORMATION_SCHEMA.APPLICABLE_ROLES matches well with this request.

Other possible approaches:

  • A function to give the default role for the current user. This would require more parameters to work for other users except the current one.
  • Modifying show grants to add an extra line there pointing to the default role. This is not 100% related to privileges so it does not match as good as adding the information within INFORMATION_SCHEMA.
  • Separate syntax show default role for [user]. This seems to add unnecessary complexity to the grammar.
  • Adding an extra variable. Users might try to set it, not considering it read only.
Generated at Thu Feb 08 07:15:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.