Bug #2642 Error in REVOKE grammar

Submitted: 4 Feb 2004 8:42 Modified: 15 Feb 2004 8:25
Reporter: Paul DuBois Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:
Assigned to: Sergei Golubchik CPU Architecture:Any

[4 Feb 2004 8:42] Paul DuBois
Description:
sql_yacc.yy says:

revoke_command: 
    grant_privileges ON opt_table FROM user_list
    {}
    |
    ALL PRIVILEGES ',' GRANT FROM user_list
    {
      Lex->sql_command = SQLCOM_REVOKE_ALL;
    }
    ;

That is not right.  The name of the privilege is
GRANT OPTION, not GRANT. For example, to
grant this privilege, you can say this:

GRANT GRANT OPTION on ...

But not this:

GRANT GRANT on ...

And to revoke it, you can say this:

REVOKE GRANT OPTION on ...

But not this:

REVOKE GRANT on ...

(See also the definition of the grant_privilege rule.)

How to repeat:
See above.

Suggested fix:
Change to:

revoke_command: 
    grant_privileges ON opt_table FROM user_list
    {}
    |
    ALL PRIVILEGES ',' GRANT OPTION FROM user_list
    {
      Lex->sql_command = SQLCOM_REVOKE_ALL;
    }
    ;
[10 Feb 2004 12:22] Timothy Smith
I think Paul knows what he is talking about here.
[15 Feb 2004 8:25] Sergei Golubchik
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:

fixed in 4.1.2

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.