Bug #18637 Server:Documentation wrong examples in 5.1 events docs
Submitted: 30 Mar 2006 2:47 Modified: 1 Apr 2006 11:09
Reporter: Paul Rivers (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.1 OS:Any (any)
Assigned to: Jon Stephens CPU Architecture:Any

[30 Mar 2006 2:47] Paul Rivers
Description:

I'm sorry if this is the wrong place to report this.

On this page:

http://dev.mysql.com/doc/refman/5.1/en/create-event.html

The syntax summary at the top is correct.  However, some examples below are syntactically wrong.

Example:

CREATE EVENT e_hourly
    EVERY 1 HOUR
    COMMENT 'Clears out sessions table each hour.'
    DO
      DELETE FROM site_activity.sessions;

This is missing the "ON SCHEDULE" part of the clause.

How to repeat:

Copy and paste the above into a 5.1.7 server mysql session where event_scheduler is ON and a dummy db site_activity and dummy table sessions exist.  The server will complain the syntax is invalid.

Suggested fix:

Fix the docs. :)
[30 Mar 2006 7:20] Paul Rivers
Synopsis updated to reflect the asked-for format in the Events Forum.
[30 Mar 2006 12:08] Valeriy Kravchuk
Thank you for a bug report. Yes, that example on http://dev.mysql.com/doc/refman/5.1/en/create-event.html should be corrected.
[1 Apr 2006 11:09] Jon Stephens
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).

Additional info:

Added missing lines in CREATE EVENT and ALTER EVENT examples. Closed.