Bug #24070 'show create view' fails for ALL PRIVILEGES user when definer can't view
Submitted: 8 Nov 2006 4:15 Modified: 14 Nov 2006 21:30
Reporter: River Tarnell
Status: Duplicate
Category:Server: Views Severity:S2 (Serious)
Version:5.0.24a-max-log OS:Sun Solaris (Solaris 10)
Assigned to: Target Version:

[8 Nov 2006 4:15] River Tarnell
Description:
when a user U, creates a view V2 which references a view V1, and U does not have access
to 'show create table' on V1, an attempt by root to 'show create table V2' will also
fail.

this is a serious bug because it prevents the 'mysqldump' utility from dumping the
affected table.

0/root@zedler:~>mysqldump -uroot -p u_stridvall >/dev/null
Enter password:
mysqldump: mysqldump: Couldn't execute 'show create table `pages_changed_since_dump`':
SHOW VIEW command denied to user 'stridvall'@'login-services.zedler.knams.wikimedia.org'
for table 'recentchanges' (1142)

root@localhost:u_stridvall> show grants;
+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost                                                              
                                               |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD
'.............................................................' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

root@localhost:u_stridvall> show create table pages_changed_since_dump;
ERROR 1142 (42000): SHOW VIEW command denied to user
'stridvall'@'login-services.zedler.knams.wikimedia.org' for table 'recentchanges'

How to repeat:
See description.
[14 Nov 2006 21:30] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes
this very problem. Even if you feel that your issue is somewhat different, the resolution
is likely
to be the same. Because of this, we hope you add your comments to the original bug
instead.

Thank you for your interest in MySQL.

Duplicates Bug #22062