Bug #110242 | zeroDateTimeBehavior=CONVERT_TO_NULL should apply to TIMSTAMP when date is zero | ||
---|---|---|---|
Submitted: | 28 Feb 2023 23:56 | Modified: | 8 May 2024 11:51 |
Reporter: | Raphael Azzolini | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 8.0.32 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[28 Feb 2023 23:56]
Raphael Azzolini
[3 Mar 2023 0:43]
Raphael Azzolini
One correction on "Other/Previous Behavior": Under Connector/J 5.1, DATETIME columns with zero date and time (such as "0000-00-00 01:01:01") are returned as with a different date. "0000-00-00 01:01:01" will be returned as "0002-11-30 01:01:01". This behaviour is not dependent on zeroDateTimeBehavior=CONVERT_TO_NULL.
[22 Jan 2024 9:15]
Gowri Sankar Andra Suryanarayana
Hello. Is there any ETA for the bug fix?
[8 May 2024 11:51]
MySQL Verification Team
Hello Raphael, Thank you for the bug report. Discussed your issue with Connector/J developer and concluded that this is not a bug. The option `zeroDateTimeBehavior` only handles the true "zero" values, as listed in the bottom of the page <https://dev.mysql.com/doc/refman/8.4/en/date-and-time-types.html>. Connector/J is not able to handle date-only "zero" values. If anything, this could be a feature request for adding another connection property specifically for this issue, however, most likely it won't go through since the server sql_mode `NO_ZERO_DATE` will be included in the strict SQL mode at some point in the future and Connector/J is required to enable it by the JDBC specification. Regards, Ashwini Patil