Bug #16405 Events: CREATE EVENT requires the word DO
Submitted: 12 Jan 2006 3:50 Modified: 22 Feb 2006 19:26
Reporter: Peter Gulutzan Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.6-alpha-debug OS:Linux (linux)
Assigned to: Andrey Hristov CPU Architecture:Any

[12 Jan 2006 3:50] Peter Gulutzan
Description:
The required syntax for CREATE EVENT is
CREATE EVENT ... DO statement;
instead of
CREATE EVENT ... statement;
The requirement for the word DO does not help the user.

How to repeat:
mysql> CREATE EVENT e_12 ON SCHEDULE EVERY 1 SECOND DO set @a = 5;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> CREATE EVENT e_12a ON SCHEDULE EVERY 1 SECOND  set @a = 5;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set @a = 5' at line 1