Bug #17394 Events: namespace is wrong
Submitted: 14 Feb 2006 19:13 Modified: 30 May 2006 7:28
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.7-beta-debug OS:Linux (SUSE 10.0)
Assigned to: Andrey Hristov CPU Architecture:Any

[14 Feb 2006 19:13] Peter Gulutzan
Description:
Different users can create events with the same name in
the same schema. Events should follow the same namespace
rules as other schema objects: there should be an error
at CREATE EVENT time.

Incidentally, I get crashes when I have two events with
the same name. I've illustrated that in the "How to repeat"
section, but it won't matter if there is an error at
CREATE EVENT time.

How to repeat:
as root, say:
create event exx on schedule every 1 second do set @a = 5;
grant event to wanda@localhost;

as wanda@localhost, say:
create event exx on schedule every 1 second do set @a = 5;

as root, say:
create event emx on schedule at current_timestamp do set @a=5;
set global event_scheduler = 1;
[14 Feb 2006 19:20] Sergei Golubchik
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

Events follow the same rules as temoporary tables
[14 Feb 2006 19:33] Peter Gulutzan
Events are not temporary tables. And bug reports which mention crashes shouldn't be dismissed as "not a bug".
[15 Feb 2006 17:40] Andrey Hristov
The crash does not occur with the patch for bug#16406. However, it's the right time to fix the in-memory cache so it uses the triple (db, name, definer) and not the tuple (db, name).
[27 Apr 2006 13:40] 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/5644
[3 May 2006 17:30] 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/5910
[16 May 2006 10:52] 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/6457
[16 May 2006 12:14] 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/6460
[23 May 2006 14:18] Konstantin Osipov
The patch from May 16th is OK to push.
[25 May 2006 13:03] 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/6873
[29 May 2006 8:40] 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/6953
[29 May 2006 11:27] Andrey Hristov
Fixed in 5.1-runtime tree. Will be pushed later to 5.1-new to be part of 5.1.12.
Events will be shared between users. So everyone who has EVENT on a specific database can see the all events in this database created by other users. Moreover, ALTER and DROP are also allowed. ALTER changes the definer though.
[30 May 2006 7:28] Jon Stephens
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:

Documented feture change in 5.1.12 changelog; updated Events chapter to reflect same. Closed.