Bug #16433 | Events: I can't use the word INTERVAL | ||
---|---|---|---|
Submitted: | 12 Jan 2006 4:32 | Modified: | 14 Feb 2006 11:13 |
Reporter: | Peter Gulutzan | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S3 (Non-critical) |
Version: | 5.1.6-alpha-debug | OS: | Linux (linux) |
Assigned to: | CPU Architecture: | Any |
[12 Jan 2006 4:32]
Peter Gulutzan
[18 Jan 2006 18:00]
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: "interval expression" is what follows the word INTERVAL. E.g. (quoting the manual) * `DATE_ADD(DATE,INTERVAL EXPR TYPE)', `DATE_SUB(DATE,INTERVAL EXPR TYPE)' These functions perform date arithmetic. DATE is a `DATETIME' or `DATE' value specifying the starting date. EXPR is an expression specifying the interval value to be added or subtracted from the starting date. After EVERY MySQL also expects "an expression specifying the interval value"
[18 Jan 2006 19:19]
Peter Gulutzan
The argument for saying "not a bug", if I understand it, is that the manual mentions that DATE_ADD() has INTERVAL expr type Since INTERVAL is not part of "expr", we should disallow the keyword INTERVAL. However, "type" includes DAY, MONTH, etc. So, by the same logic, MySQL should disallow ON SCHEDULE EVERY 1 DAY. In other words, applying this argument would lead to an unacceptable conclusion. MySQL does allow expressions containing the word INTERVAL, e.g. CURRENT_TIMESTAMP + INTERVAL 1 DAY, and the ANSI/ISO description for an "interval literal" says the word INTERVAL is okay.
[14 Feb 2006 11:13]
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: See http://dev.mysql.com/doc/refman/5.1/en/events-create.html