Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.0, 10.1, 10.2, 10.3, 10.4
-
None
Description
10.4 4abb8216a054e14afbeb81e8529e02bab6fa14ac |
MariaDB [test]> CREATE ROLE r WITH ADMIN u; |
Query OK, 0 rows affected, 1 warning (0.02 sec) |
|
MariaDB [test]> show warnings;
|
+-------+------+----------------------------------------------------------+ |
| Level | Code | Message | |
+-------+------+----------------------------------------------------------+ |
| Note | 1449 | The user specified as a definer ('u'@'%') does not exist | |
+-------+------+----------------------------------------------------------+ |
1 row in set (0.00 sec) |
|
MariaDB [test]> FLUSH PRIVILEGES; |
Query OK, 0 rows affected (0.00 sec) |
So, the first statement (CREATE) succeeds, even although with the warning, and the role is created. The error log is clean at this point.
The second statement (FLUSH) also succeeds, and even without warnings, but upon it an error appears in the error log:
[ERROR] Invalid roles_mapping table entry user:'u@%', rolename:'r'
|
It seems inconsistent. If the entry is indeed so invalid it deserves an error, it probably shouldn't be created. If it's worrisome but not really invalid, it should be a warning. And if FLUSH PRIVILEGES encounters an invalid record, it should produce an SQL warning or error, not just a log record.