Bug #16236 | show_view_priv set to No user is still able to run show create table or create | ||
---|---|---|---|
Submitted: | 5 Jan 2006 20:38 | Modified: | 9 Jan 2006 23:31 |
Reporter: | Gordon Bruce | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.17-nt | OS: | Windows (Windows XP) |
Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
[5 Jan 2006 20:38]
Gordon Bruce
[5 Jan 2006 23:09]
MySQL Verification Team
I was unable to repeat the behavior reported. Could you please test with another database instead of called test and if you are able to repeat please provide the complete test script: C:\mysql\bin>mysql -uroot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.18-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create database db4; Query OK, 1 row affected (0.06 sec) mysql> use db4 Database changed mysql> create table tb1 (id int); Query OK, 0 rows affected (0.06 sec) mysql> create view vtb1 as select * from tb1 where id > 10; Query OK, 0 rows affected (0.01 sec) mysql> grant select on db4.* to "user1"@"localhost" identified by "user1"; Query OK, 0 rows affected (0.02 sec) mysql> select user,create_view_priv,show_view_priv from mysql.user; +--------+------------------+----------------+ | user | create_view_priv | show_view_priv | +--------+------------------+----------------+ | root | Y | Y | | miguel | N | N | | user1 | N | N | +--------+------------------+----------------+ 3 rows in set (0.02 sec) C:\mysql\bin>mysql -uuser1 -puser1 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 5.0.18-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use db4 Database changed mysql> show tables; +---------------+ | Tables_in_db4 | +---------------+ | tb1 | | vtb1 | +---------------+ 2 rows in set (0.00 sec) mysql> show create table vtb1; ERROR 1142 (42000): SHOW VIEW command denied to user 'user1'@'localhost' for table 'vtb1' mysql>
[9 Jan 2006 21:50]
Gordon Bruce
I tried it with a different table name than test and it worked as I expected i.e. a user without show access gets denied when they try to da a SHOW CREATE TABLE. You can close this report.
[9 Jan 2006 23:31]
MySQL Verification Team
Thank you for the feedback and bug report.