Bug #108628 I saved 1941-10-01, 1942-09-01, 1906-01-01 date on my DB and when I am trying to
Submitted: 28 Sep 2022 8:20 Modified: 28 Sep 2022 12:53
Reporter: Vishesh Dhomne Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Connection Handling Severity:S3 (Non-critical)
Version:8.0.27 OS:Ubuntu
Assigned to: CPU Architecture:Any

[28 Sep 2022 8:20] Vishesh Dhomne
Description:
I saved 1941-10-01,1942-09-01,1906-01-01 date on my DB and when I am trying to fetch data then I am getting following error.I am using mysql-connector version 8.0.27. if I changed version to 8.0.22 then it is working fine.

Caused by: com.mysql.cj.exceptions.WrongArgumentException: HOUR_OF_DAY: 0 -> 1
	at jdk.internal.reflect.GeneratedConstructorAccessor899.newInstance(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
	at com.mysql.cj.result.SqlTimestampValueFactory.localCreateFromDate(SqlTimestampValueFactory.java:102)
	at com.mysql.cj.result.SqlTimestampValueFactory.localCreateFromDate(SqlTimestampValueFactory.java:51)
	at com.mysql.cj.result.AbstractDateTimeValueFactory.createFromDate(AbstractDateTimeValueFactory.java:69)
	at com.mysql.cj.protocol.a.MysqlTextValueDecoder.decodeDate(MysqlTextValueDecoder.java:77)
	at com.mysql.cj.protocol.result.AbstractResultsetRow.decodeAndCreateReturnValue(AbstractResultsetRow.java:92)
	at com.mysql.cj.protocol.result.AbstractResultsetRow.getValueFromBytes(AbstractResultsetRow.java:243)
	at com.mysql.cj.protocol.a.result.ByteArrayRow.getValue(ByteArrayRow.java:91)
	... 98 more
Caused by: java.lang.IllegalArgumentException: HOUR_OF_DAY: 0 -> 1
	at java.base/java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2826)
	at java.base/java.util.Calendar.updateTime(Calendar.java:3428)
	at java.base/java.util.Calendar.getTimeInMillis(Calendar.java:1812)
	at com.mysql.cj.result.SqlTimestampValueFactory.localCreateFromDate(SqlTimestampValueFactory.java:100)
	... 104 more
org.codehaus.jackson.JsonParseException: Unexpected character ('E' (code 69)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@4ab6a5ce; line: 1, column: 2]
	at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1432)
	at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:385)
	at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:306)
	at org.codehaus.jackson.impl.ReaderBasedParser._handleUnexpectedValue(ReaderBasedParser.java:1192)
	at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:479)
	at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2761)
	at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2709)
	at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1854)

How to repeat:
try to save this dates 1941-10-01,1942-09-01,1906-01-01 and fetch data using hibernate with mysql-connector version 8.0.27
[28 Sep 2022 12:53] MySQL Verification Team
Hi Mr. Dhomne,

Thank you very much for your bug report.

You have set this bug to the category of "MySQL Server: Connection Handling". However, the trace that you have sent us is NOT from the the server and definitely not from the module of the server that is receiving data from and sending data to the client-side.

On the contrary. Your traces are from some MySQL Connector and we are not sure which from. Hence, this bug will be closed, unless you provide us with necessary information.

First of all, choose the proper category for the Connector that you are using, instead of the server, which is not a source of your problem. If it is some Connector that you are using, you should use 8.0.30 release of both the server and the connector in question.

If you are able to get the same errors, then we need lots of additional informations. Please, read on .....

Next, we should be provided with a detailed and fully repeatable test case that will lead to the problem that you are encountering. That means, it should contain SQL dump of the tables in question and your application code that causes this error.

When we receive all this info, we shall change the status of this bug report and we will then try to repeat the behaviour and would analyse whether it is problem on our side or on your side. Do note that you are supposed to follow the changes in server and Connector that you use in order to be able to code your application so that it does not cause any problems, unless it is our bug.

Can't repeat.