Bug #6123 | 'grant usage...' command acts like 'revoke' command | ||
---|---|---|---|
Submitted: | 16 Oct 2004 3:54 | Modified: | 11 Nov 2004 21:02 |
Reporter: | jerry marbas | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S2 (Serious) |
Version: | 4.0.21-debug | OS: | Windows (windows 2000) |
Assigned to: | Antony Curtis | CPU Architecture: | Any |
[16 Oct 2004 3:54]
jerry marbas
[16 Oct 2004 5:41]
Alexander Keremidarski
Verified on Linux with 4.0 from bk tree ChangeSet@1.2038, 2004-10-12 18:12:00+03:00, heikki@hundin.mysql.fi mysql> grant usage on books.* to sally identified by 'magic123'; Query OK, 0 rows affected (0.01 sec) mysql> select host,db,user,select_priv,insert_priv from db where user = 'sally';+------+-------+-------+-------------+-------------+ | host | db | user | select_priv | insert_priv | +------+-------+-------+-------------+-------------+ | % | books | sally | N | N | +------+-------+-------+-------------+-------------+ This is a bug because USAGE is global privilege only and it should not add any rows to mysql.db SHOW GRANTS after the above sequence returns correct information: mysql> show grants for sally; +-----------------------------------------------------------------------------+ | Grants for sally@% | +-----------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'sally'@'%' IDENTIFIED BY PASSWORD '550331e54525bfa3' | +-----------------------------------------------------------------------------+ mysql> grant usage on books.* to sally identified by 'magic123'; Query OK, 0 rows affected (0.00 sec) mysql> select host,db,user,select_priv,insert_priv from db where user = 'sally'; Empty set (0.00 sec) Like the user reported the redunant line in mysql.db disappears after second GRANT USAGE
[11 Nov 2004 21:02]
Antony Curtis
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html