Bug #25769 | A valid timestamp value is rejected as a value for a timestamp column | ||
---|---|---|---|
Submitted: | 23 Jan 2007 3:22 | Modified: | 23 Jan 2007 14:04 |
Reporter: | Fred Kuipers | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S2 (Serious) |
Version: | 5.0.27-community-nt | OS: | Windows (Windows XP) |
Assigned to: | CPU Architecture: | Any |
[23 Jan 2007 3:22]
Fred Kuipers
[23 Jan 2007 11:27]
Hartmut Holzgraefe
- 20050403024322 this one is easy to explain: daylight saving time, this hour simply didn't exist as DST switched from 2005-04-03 01:59:59 to 03:00:00 - 20060702024829 looks interesting, but assuming a typo here i'd say the 07 is actually a 04, so 2006-04-02, which again is the DST switch date So not a a bug but expected behavior ...
[23 Jan 2007 14:04]
Fred Kuipers
Ok... I can understand the reasoning behind it -- however, it seems like a breaking change to reject values that were previously accepted. There were 57000+ such values in the wikipedia data I processed. Is there any way to force MySQL to "fix" those values -- ie, make them 03:43:22 instead? That said, why then, does the following statement not give an error? mysql> select cast(20050403024322 AS datetime) as InvalidDate; +---------------------+ | InvalidDate | +---------------------+ | 2005-04-03 02:43:22 | +---------------------+ 1 row in set (0.00 sec)