Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.4.0
-
None
Description
In JDBC driver 3.3.3 and older, using dates which contain zeros in day or month, like 0001-00-00 where not problem. Changing the mechanism how the datatime is parsed, done as part of CONJ-1171 in 3.4.0, introduced a regression and now using such datetime results into throwing a DateTimeException:
Caused by: java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
|
at java.base/java.time.temporal.ValueRange.checkValidValue(ValueRange.java:319)
|
at java.base/java.time.temporal.ChronoField.checkValidValue(ChronoField.java:718)
|
at java.base/java.time.LocalDate.of(LocalDate.java:273)
|
at java.base/java.time.LocalDateTime.of(LocalDateTime.java:338)
|
at org.mariadb.jdbc.client.column.TimestampColumn.parseText(TimestampColumn.java:337)
|
at org.mariadb.jdbc.client.column.TimestampColumn.decodeTimestampText(TimestampColumn.java:313)
|
at org.mariadb.jdbc.client.column.TimestampColumn.getDefaultText(TimestampColumn.java:97)
|
at org.mariadb.jdbc.client.result.rowdecoder.TextRowDecoder.defaultDecode(TextRowDecoder.java:43)
|
at org.mariadb.jdbc.client.result.Result.getObject(Result.java:802
|
Attachments
Issue Links
- relates to
-
CONJ-1195 JDBC throw exception on bad DATE
-
- Open
-
closing as dupplicate, option will be available in 3.6