Bug #16412 Events: SHOW PRIVILEGES gives incorrect information
Submitted: 12 Jan 2006 5:00 Modified: 27 Feb 2006 21:27
Reporter: Peter Gulutzan
Status: Closed
Category:Server: SP Severity:S3 (Non-critical)
Version:5.1.6-alpha-debug OS:Linux (SUSE 10.0)
Assigned to: Andrey Hristov Target Version:

[12 Jan 2006 5:00] Peter Gulutzan
Description:
SHOW PRIVILEGES says EVENT allows "Creation, alteration, deletion
and execution of events". But you can't DELETE events,
and their execution should depend whether you have
appropriate privileges for the statements in the body,
not EVENT privileges.

How to repeat:

mysql> show privileges;
+-------------------------+---------------------------------------+---------------------------------------------------------+
| Privilege               | Context                               | Comment              
                                  |
+-------------------------+---------------------------------------+---------------------------------------------------------+
| Alter                   | Tables                                | To alter the table   
                                  |
| Alter routine           | Functions,Procedures                  | To alter or drop
stored functions/procedures            |
| Create                  | Databases,Tables,Indexes              | To create new
databases and tables                      |
| Create routine          | Functions,Procedures                  | To use CREATE
FUNCTION/PROCEDURE                        |
| Create temporary tables | Databases                             | To use CREATE
TEMPORARY TABLE                           |
| Create view             | Tables                                | To create new views  
                                  |
| Create user             | Server Admin                          | To create new users  
                                  |
| Delete                  | Tables                                | To delete existing
rows                                 |
| Drop                    | Databases,Tables                      | To drop databases,
tables, and views                    |
| Event                   | Server Admin                          | Creation, alteration,
deletion and execution of events. |
| Execute                 | Functions,Procedures                  | To execute stored
routines                              |
| File                    | File access on server                 | To read and write
files on the server                   |
| Grant option            | Databases,Tables,Functions,Procedures | To give to other
users those privileges you possess     |
| Index                   | Tables                                | To create or drop
indexes                               |
| Insert                  | Tables                                | To insert data into
tables                              |
| Lock tables             | Databases                             | To use LOCK TABLES
(together with SELECT privilege)     |
| Process                 | Server Admin                          | To view the plain
text of currently executing queries   |
| References              | Databases,Tables                      | To have references on
tables                            |
| Reload                  | Server Admin                          | To reload or refresh
tables, logs and privileges        |
| Replication client      | Server Admin                          | To ask where the
slave or master servers are            |
| Replication slave       | Server Admin                          | To read binary log
events from the master               |
| Select                  | Tables                                | To retrieve rows from
table                             |
| Show databases          | Server Admin                          | To see all databases
with SHOW DATABASES                |
| Show view               | Tables                                | To see views with
SHOW CREATE VIEW                      |
| Shutdown                | Server Admin                          | To shut down the
server                                 |
| Super                   | Server Admin                          | To use KILL thread,
SET GLOBAL, CHANGE MASTER, etc.     |
| Update                  | Tables                                | To update existing
rows                                 |
| Usage                   | Server Admin                          | No privileges - allow
connect only                      |
+-------------------------+---------------------------------------+---------------------------------------------------------+
28 rows in set (0.00 sec)
[24 Jan 2006 13:52] Andrey Hristov
Peter, what do you propose for text?
Thanks!
[15 Feb 2006 21: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/2679
[23 Feb 2006 19:35] Sergei Golubchik
Approved as "To create, alter, drop and execute events"
[24 Feb 2006 11:54] 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/3098
[24 Feb 2006 13:37] 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/3103
[24 Feb 2006 15:35] Andrey Hristov
Fixed in 5.1.8 with the message "To create, alter, drop and execute events"
[27 Feb 2006 21:27] Mike Hillyer
Documented in 5.1.8 changelog:

     <listitem>
        <para>
          Description of the <literal>EVENT</literal> privilege has been
          changed to <literal>To create, alter, drop and execute
            events</literal>. (Bug #16412)
        </para>
      </listitem>