Bug #9795 | MySQL forgets about SHOW VIEW / CREATE VIEW privileges granted on table level | ||
---|---|---|---|
Submitted: | 10 Apr 2005 18:12 | Modified: | 8 Jul 2005 17:50 |
Reporter: | Alexander M. Turek | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.4-beta-nightly-20050402 | OS: | Linux (Linux 2.6) |
Assigned to: | Oleksandr Byelkin | CPU Architecture: | Any |
[10 Apr 2005 18:12]
Alexander M. Turek
[20 Apr 2005 16:03]
Tobias Asplund
Doesn't only affect VIEW privileges, seems to be a global thing. (fresh pull from bk-tree) mysql> \r Connection id: 1 Current database: mysql mysql> SHOW GRANTS FOR sr@localhost; +---------------------------------------------------+ | Grants for sr@localhost | +---------------------------------------------------+ | GRANT USAGE ON *.* TO 'sr'@'localhost' | | GRANT SELECT ON `skup0003_`.* TO 'sr'@'localhost' | +---------------------------------------------------+ 2 rows in set (0.00 sec) mysql> GRANT INSERT ON skup0003_.alts TO sr@localhost; Query OK, 0 rows affected (0.03 sec) mysql> SHOW GRANTS FOR sr@localhost; +--------------------------------------------------------+ | Grants for sr@localhost | +--------------------------------------------------------+ | GRANT USAGE ON *.* TO 'sr'@'localhost' | | GRANT SELECT ON `skup0003_`.* TO 'sr'@'localhost' | | GRANT INSERT ON `skup0003_`.`alts` TO 'sr'@'localhost' | +--------------------------------------------------------+ 3 rows in set (0.00 sec) mysql> \q Bye flupps@eeyore:~$ mysqladmin shutdown flupps@eeyore:~$ STOPPING server from pid file /var/mysql/eeyore.flupps.org.pid 050420 17:54:21 mysqld ended root@eeyore:/usr/local/mysql# ./bin/mysqld_safe & [1] 52710 root@eeyore:/usr/local/mysql# Starting mysqld daemon with databases from /var/mysql flupps@eeyore:~$ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.5-beta-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> SHOW GRANTS FOR sr@localhost; +---------------------------------------------------+ | Grants for sr@localhost | +---------------------------------------------------+ | GRANT USAGE ON *.* TO 'sr'@'localhost' | | GRANT SELECT ON `skup0003_`.* TO 'sr'@'localhost' | +---------------------------------------------------+ 2 rows in set (0.00 sec)
[22 Jun 2005 19:52]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/26343
[3 Jul 2005 20:02]
Michael Widenius
Patch is ok, but before pushing add the following tests: - Add only SHOW VIEW privilege for a view - Check that it works and that 'select from ... TABLE_PRIVILEGES' shows the privilege' - flush privileges - Check that it works and that 'select from ... TABLE_PRIVILEGES' shows the privilege' Do the same for CREATE VIEW
[5 Jul 2005 10:36]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/26671
[5 Jul 2005 13:03]
Oleksandr Byelkin
pushed to 5.0.9
[8 Jul 2005 17:50]
Jon Stephens
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 Additional info: Documented in 5.0.9 change history; closed.