Bug #31535 | ALTER EVENT fails if 'RENAME...' and 'ON COMPLETION...' clauses are included | ||
---|---|---|---|
Submitted: | 11 Oct 2007 14:23 | Modified: | 29 Nov 2007 18:38 |
Reporter: | Omer Barnir (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.1.22 | OS: | Any |
Assigned to: | Paul DuBois | CPU Architecture: | Any |
[11 Oct 2007 14:23]
Omer Barnir
[11 Oct 2007 14:28]
Andrey Hristov
Not sure if should be considered a bug, there is an order. If a bug, then in the parser. Server version: 5.1.23-beta-debug Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use test; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> CREATE EVENT ev1 ON SCHEDULE EVERY 3 SECOND DO insert into tb1 values (1); Query OK, 0 rows affected (0.03 sec) mysql> alter event ev1 RENAME TO ev2 ON COMPLETION PRESERVE; 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 'ON COMPLETION PRESERVE' at line 1 mysql> alter event ev1 ON COMPLETION PRESERVE RENAME TO ev2; Query OK, 0 rows affected (0.00 sec)
[11 Oct 2007 15:35]
Omer Barnir
The documentation lsts the RENAME before the ON COMPLETION. So if the ALTER is order dependednt, the doc needs to be updated.
[27 Nov 2007 0:33]
Damien Katz
This isn't a bug, but rather a documentation issue. The example given will work if this statement: alter event ev1 RENAME TO ev2 ON COMPLETION PRESERVE; Is changed to: alter event ev1 ON COMPLETION PRESERVE RENAME TO ev2; The documentation that lists the params for "alter event" should be changed to this: ALTER EVENT [DEFINER = { user | CURRENT_USER }] event_name [ON SCHEDULE schedule] [ON COMPLETION [NOT] PRESERVE] [RENAME TO new_event_name] [ENABLE | DISABLE | DISABLE ON SLAVE] [COMMENT 'comment'] [DO sql_statement]
[29 Nov 2007 18:38]
Paul DuBois
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 products.