Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
-
None
Description
to see a database, for example, in SHOW DATABASES a user must have at least some privilege on that database. GRANT OPTION is enough:
GRANT USAGE ON *.* TO user@host WITH GRANT OPTION; |
allows to see all databases.
As GRANT OPTION is not a real privilege, perhaps it shouldn't allow to see databases?
MySQL Bug#25203933, fixed in 5.7.40 and in 8.0.17
Attachments
Issue Links
- links to
No. In MySQL (before those mentioned versions) and in MariaDB GRANT OPTION is a real privilege. This is non-standard, indeed, in the standard GRANT OPTION is not a privilege, but a property of a granted privilege. For example, after
in MySQL and MariaDB the user will have three privileges on the database foo — SELECT, INSERT, and GRANT. And will be able to grant them to other users.
In the standard the user will have two privileges, SELECT and INSERT, and the user will be able to grant SELECT, but not INSERT.
It would be great to change the semantics of GRANT OPTION to follow the standard, although it'll be a huge break in compatibility.
But until this is done, GRANT OPTION is a normal privilege and must behave as any other normal privilege. Without hard-coded special behavior that makes it a normal privilege except in SHOW DATABASES (and USE).