[CONJ-57] When calling setObject(new Date(), Types.TimeStamp) from a Preparedstatement the field is filled with a zero date String. Created: 2013-07-19 Updated: 2013-07-24 Resolved: 2013-07-24 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | 1.1.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Frank S | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When calling setObject(new Date(), Types.TimeStamp) from a Preparedstatement the field is filled with a zero date String.
|
| Comments |
| Comment by Vladislav Vaintroub [ 2013-07-19 ] |
|
Is there any good reason to use java.util.Date() instead of appropriate datatype (java.util.Timestamp?) |
| Comment by Frank S [ 2013-07-19 ] |
|
I don't know if this is a good reason to use Date. I'm testing the maria db connector against existing code which has used the mysql connector before. And with the mysql connector it was working. You could not exclude that others running against the same problem when switching from mysql to the maria conenctor. |
| Comment by Vladislav Vaintroub [ 2013-07-19 ] |
|
I would not expect the bug to have a high impact, since support for java.util.Date is not documented ( I use http://dev.mysql.com/doc/refman/5.6/en/connector-j-reference-type-conversions.html as reference). so it is a matter of luck that it happens to work |
| Comment by Vladislav Vaintroub [ 2013-07-24 ] |
|
The test case here still has some problems. |