Bug #16434 Events: Illegal dates don't cause errors
Submitted: 12 Jan 2006 4:33 Modified: 2 Feb 2006 5:07
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.6-alpha-debug OS:Linux (SUSE 10.0)
Assigned to: Andrey Hristov CPU Architecture:Any

[12 Jan 2006 4:33] Peter Gulutzan
Description:
In CREATE EVENT ... STARTS ... ENDS ..., I enter
an illegal date and time. This does not cause an
error. It only causes a warning.

How to repeat:

mysql> create event e_47  on schedule every 1 second  starts 20070101240000  ends 20070102000000  do set @a = 5;
Query OK, 1 row affected, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+--------------------------------------------+
| Level   | Code | Message                                    |
+---------+------+--------------------------------------------+
| Warning | 1292 | Incorrect datetime value: '20070101240000' |
+---------+------+--------------------------------------------+
1 row in set (0.00 sec)
[18 Jan 2006 18:46] 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/1285
[23 Jan 2006 11:26] 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/1489
[23 Jan 2006 11:31] Andrey Hristov
Go back to patch pending because the new patch is a bit changed
[26 Jan 2006 21:03] 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/1694
[27 Jan 2006 0:20] Andrey Hristov
The date for STARTS/ENDS wasn't handled correctly - not converted internaly to datetime but to int.

Fixed in 5.1.6 .
[2 Feb 2006 5:07] Mike Hillyer
Documented in 5.1.6 changelog.