[CONJ-713] After getTimestamp with 0000-00-00 00:00:00 all other values return NULL Created: 2019-06-11 Updated: 2021-11-17 Resolved: 2019-07-30 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 2.1.0, 2.4.0 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Blocker |
| Reporter: | sfahren | Assignee: | Diego Dupin |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | timestamp, wasNull | ||
| Environment: |
MariaDB 10.4/10.2; Windows |
||
| Attachments: |
|
| Description |
|
Hello, In the attechment is a small use case test. |
| Comments |
| Comment by Diego Dupin [ 2019-06-11 ] |
|
I've run WasNullTest.java file with different driver version without error. I must miss the point here. You will tell ! Having resultset.wasNull to return null when having '0000-00-00 00:00:00' is deliberate. This has a specific behavior in the connector, since it cannot be represented in java.sql.Timestamp (min year is 1970). It is considered as null, but getString on a '0000-00-00 00:00:00' value will still return '0000-00-00 00:00:00' value. I don't understand why you speak about ResultSet.getInt(). Is is on this timestamp field or on a field after this one ? |
| Comment by Diego Dupin [ 2019-07-24 ] |
|
fahrenholz any thought on how to reproduce? |
| Comment by Diego Dupin [ 2019-07-30 ] |
|
closing since not reproduced and no response |