Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1.44, 10.2.31, 10.3.22, 10.4.12, 10.5.2
-
None
Description
Let's say that we create a role and a user account:
MariaDB [(none)]> CREATE ROLE 'test_role'; |
Query OK, 0 rows affected (0.004 sec) |
|
MariaDB [(none)]> CREATE USER 'test_user'@'%'; |
Query OK, 0 rows affected (0.004 sec) |
And then let's say that we set this role to be the default role for the user account:
MariaDB [(none)]> GRANT 'test_role' TO 'test_user'@'%'; |
Query OK, 0 rows affected (0.004 sec) |
|
MariaDB [(none)]> SET DEFAULT ROLE 'test_role' FOR 'test_user'@'%'; |
Query OK, 0 rows affected (0.004 sec) |
Neither SHOW CREATE USER now SHOW GRANTS prints this default role for the user account:
MariaDB [(none)]> SHOW CREATE USER 'test_user'@'%'; |
+-----------------------------+ |
| CREATE USER for test_user@% | |
+-----------------------------+ |
| CREATE USER 'test_user'@'%' | |
+-----------------------------+ |
1 row in set (0.000 sec) |
|
MariaDB [(none)]> SHOW GRANTS FOR 'test_user'@'%'; |
+---------------------------------------+ |
| Grants for test_user@% | |
+---------------------------------------+ |
| GRANT test_role TO 'test_user'@'%' | |
| GRANT USAGE ON *.* TO 'test_user'@'%' | |
+---------------------------------------+ |
2 rows in set (0.000 sec) |
In my opinion, it should at least be printed by SHOW GRANTS, since it is somewhat related to one of the grants that is printed.
Attachments
Issue Links
- relates to
-
MDEV-23630 mysqldump to logically dump system tables
- Closed
-
MDEV-26080 SHOW GRANTS does not quote role names properly for DEFAULT ROLE
- Closed
-
MDEV-22311 implement SHOW CREATE ROLE
- Open
-
MDEV-22312 Bad error message for SET DEFAULT ROLE when user account is not granted the role
- Closed