Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.4.6
-
None
Description
This bug is similar to CONJ-226, but this bug effects getString(), rather than getTime().
I've attached a test program similar to the JUnit test case in CONJ-226 to demonstrate the behavior. To make it work, first, you would need to perform some setup steps:
create table db1.time_test (
|
ID int unsigned NOT NULL,
|
time_test time NOT NULL,
|
PRIMARY KEY (ID)
|
) engine=InnoDB;
|
 |
insert into db1.time_test(id, time_test) values(1, '00:00:00'), (2, '08:00:00');
|
Then build and execute the program:
$ javac -cp .:/home/ec2-user/mariadb-jdbc-1.4.6/jar/mariadb-java-client-1.4.6.jar MariaDbJdbcDriverTest.java
|
$ java -cp .:/home/ec2-user/mariadb-jdbc-1.4.6/jar/mariadb-java-client-1.4.6.jar MariaDbJdbcDriverTest
|
Example output:
ID: 1, Time: 00:00:00
|
Testing PreparedStatement with getTime()
|
ID: 1, Time: 00:00:00
|
Testing Statement with getString()
|
ID: 1, Time: 00:00:00
|
Testing PreparedStatement with getString()
|
ID: 1, Time: null
|