Bug #30305 Create routine in wrong context in SHOW PRIVILEGES
Submitted: 8 Aug 2007 13:45 Modified: 18 Mar 2009 14:24
Reporter: Jakub Vrana (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S3 (Non-critical)
Version:5.0.45/5.1/6.0 OS:Any
Assigned to: Sergei Glukhov CPU Architecture:Any
Tags: qc

[8 Aug 2007 13:45] Jakub Vrana
Description:
Privilege "Create routine" is listed by SHOW PRIVILEGES in context "Functions,Procedures". However documentation says that CREATE ROUTINE is a database level privilege and GRANT CREATE ROUTINE ON FUNCTION really is not possible.

How to repeat:
SHOW PRIVILEGES

Suggested fix:
Change context of Create routine to Databases.
[28 Oct 2008 16:12] MySQL Verification Team
Thank you for the bug report. Verified as described:

Your MySQL connection id is 1
Server version: 5.0.72-nt-debug-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql 5.0 > SHOW PRIVILEGES;
+-------------------------+-------------------------------------
| Privilege               | Context
+-------------------------+-------------------------------------
| Alter                   | Tables
| Alter routine           | Functions,Procedures
| Create                  | Databases,Tables,Indexes
| Create routine          | Functions,Procedures
[24 Feb 2009 12:09] 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/commits/67360

2756 Sergey Glukhov	2009-02-24
      Bug#30305 Create routine in wrong context in SHOW PRIVILEGES
      Changed context of Create routine to Databases.
     @ mysql-test/r/sp.result
        result fix
     @ sql/sql_show.cc
        Changed context of Create routine to Databases.
[25 Feb 2009 10:20] 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/commits/67483

2762 Sergey Glukhov	2009-02-25
      Bug#30305 Create routine in wrong context in SHOW PRIVILEGES
      Changed context of Create routine to Databases.
     @ mysql-test/r/grant.result
        result fix
     @ mysql-test/r/sp.result
        result fix
     @ sql/sql_show.cc
        Changed context of Create routine to Databases.
[9 Mar 2009 14:11] Bugs System
Pushed into 5.0.79 (revid:joro@sun.com-20090309135922-a0di9ebkxoj4d4wv) (version source revid:staale.smedseng@sun.com-20090227160758-td4jot2la75f9zy1) (merge vers: 5.0.79) (pib:6)
[13 Mar 2009 2:15] Paul DuBois
Noted in 5.0.79 changelog.

SHOW PRIVILEGES listed the CREATE ROUTINE privilege as having a 
context of Functions,Procedures, but it is a database-level
privilege. 

Setting report to NDI pending push into 5.1.x/6.0.x.
[13 Mar 2009 19:05] Bugs System
Pushed into 5.1.33 (revid:joro@sun.com-20090313111355-7bsi1hgkvrg8pdds) (version source revid:sergey.glukhov@sun.com-20090225121824-y9a2evkmh16ripx5) (merge vers: 5.1.33) (pib:6)
[13 Mar 2009 20:13] Paul DuBois
Noted in 5.1.33 changelog.

Setting report to NDI pending push into 6.0.x.
[18 Mar 2009 13:16] Bugs System
Pushed into 6.0.11-alpha (revid:joro@sun.com-20090318122208-1b5kvg6zeb4hxwp9) (version source revid:sergey.glukhov@sun.com-20090225124206-5q4wfht0mudbcmzb) (merge vers: 6.0.10-alpha) (pib:6)
[18 Mar 2009 14:24] Paul DuBois
Noted in 6.0.11 changelog.
[9 May 2009 16:43] Bugs System
Pushed into 5.1.34-ndb-6.2.18 (revid:jonas@mysql.com-20090508185236-p9b3as7qyauybefl) (version source revid:jonas@mysql.com-20090508100057-30ote4xggi4nq14v) (merge vers: 5.1.33-ndb-6.2.18) (pib:6)
[9 May 2009 17:40] Bugs System
Pushed into 5.1.34-ndb-6.3.25 (revid:jonas@mysql.com-20090509063138-1u3q3v09wnn2txyt) (version source revid:jonas@mysql.com-20090508175813-s6yele2z3oh6o99z) (merge vers: 5.1.33-ndb-6.3.25) (pib:6)
[9 May 2009 18:38] Bugs System
Pushed into 5.1.34-ndb-7.0.6 (revid:jonas@mysql.com-20090509154927-im9a7g846c6u1hzc) (version source revid:jonas@mysql.com-20090509073226-09bljakh9eppogec) (merge vers: 5.1.33-ndb-7.0.6) (pib:6)