[CONJ-791] Using CallableStatement.getTimestamp() can't get data correctly Created: 2020-05-19 Updated: 2020-06-08 Resolved: 2020-06-08 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | JDBC 4.2 compatibility |
| Affects Version/s: | 2.6.0 |
| Fix Version/s: | 2.6.1 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Chow King Tak | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
MariaDB 10.4.7, RHEL 7 |
||
| Attachments: |
|
| Description |
|
I have a SP as follows. It simply sets the output parameters to a fix value. DELIMITER $$ DROP PROCEDURE IF EXISTS `test_SP` $$ OUT para3 NVARCHAR(10), OUT para6 datetime, ) SET para3 := 'PARAM 3'; SET para6 := '2006-01-01 01:01:16'; END $$ I have a Java program (see TestGetDateTime.java attached) to run the SP and retrieve the datetime values using getDate() and getTime(). All output parameter values can be retreived correctly as follows: param3=PARAM 3 Then I have a same Java program (see TestTimestamp.java), but using getTimestamp() instead to get the datetime values. It fails to get all output parameters and the datetime values are incorrect (see param6 & param7) as follows: param3=PARAM 3 However, I have tried the MySQL Connector/J, there is no problem using getTimestamp(), I can get all values correctly. Please investigate the problem. |
| Comments |
| Comment by Diego Dupin [ 2020-06-08 ] | ||||||||||||||||
|
Thanks for pointing that out. and available in SNAPSHOT repository:
|