Bug #17714 SHOW CREATE EVENT qualifies event names with database
Submitted: 25 Feb 2006 4:59 Modified: 13 Mar 2006 10:56
Reporter: Chad MILLER Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version: OS:
Assigned to: Chad MILLER CPU Architecture:Any

[25 Feb 2006 4:59] Chad MILLER
Description:
Blocks other showstopper, #16853.  Added at Andrey's behest.

Event-creation strings from this can not be used to create events in another database.

How to repeat:
> create event ee on schedule every 1 year do set @a=5;
> show create event ee;

Suggested fix:
===== event_timed.cc 1.38 vs edited =====
--- 1.38/sql/event_timed.cc     2006-02-24 08:02:14 -05:00
+++ edited/event_timed.cc       2006-02-24 23:22:17 -05:00
@@ -1030,8 +1030,10 @@
     DBUG_RETURN(EVEX_MICROSECOND_UNSUP);
 
   buf->append(STRING_WITH_LEN("CREATE EVENT "));
-  append_identifier(thd, buf, dbname.str, dbname.length);
-  buf->append(STRING_WITH_LEN("."));
   append_identifier(thd, buf, name.str, name.length);
 
   buf->append(STRING_WITH_LEN(" ON SCHEDULE "));
[25 Feb 2006 14:10] Chad MILLER
Perhaps it should be quallified IFF the name used to query it is qualified.
[26 Feb 2006 19: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/3164
[27 Feb 2006 18: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/3211
[9 Mar 2006 3:27] 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/3614
[9 Mar 2006 20: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/3660
[13 Mar 2006 10:56] 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 feature change in 5.1.8 changelog; closed.

PLEASE NOTE: I was able to derive version number from changeset, but this is not always the case. Please remember to include 3-part version number when noting changeset and setting to Documenting status! Thanks.