Bug #69343 | SQL Exception when timstamp column 000-00-00 00:00:00 | ||
---|---|---|---|
Submitted: | 29 May 2013 12:26 | Modified: | 29 May 2013 13:39 |
Reporter: | Philippe Boivin | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.1.25 | OS: | Any |
Assigned to: | Alexander Soklakov | CPU Architecture: | Any |
Tags: | java, mysl connector, sql exception, timestamp |
[29 May 2013 12:26]
Philippe Boivin
[29 May 2013 13:39]
Alexander Soklakov
Hi Philippe, Thanks for your report. This is not a bug, Connector/J has connection property "zeroDateTimeBehavior" to handle this situation. According to documentation http://dev.mysql.com/doc/refman/5.6/en/connector-j-reference-configuration-properties.html: "What should happen when the driver encounters DATETIME values that are composed entirely of zeros (used by MySQL to represent invalid dates)? Valid values are "exception", "round" and "convertToNull"." Default value is "exception", just change it to appropriate for you.