My SQL 5.6.4 DATETIME column milliseconds is not getting stored Beginning from MySQL 5.6.4, milliseconds support is provided for date columns like DATETIME etc.

I just created a table to check if its working:

create table testdata(startime  DATETIME(5));


However, when I save some DATE(java.lang.Date) value using iBATIS framework it is ignoring milliseconds and storing:

2012-04-16 17:54:55.00000


Any idea how to resolve this issue?

When I use an SQL query like INSERT INTO testdata VALUES ('2012-04-16 17:54:55.32345') it stores milliseconds properly.  I want it to work via iBATIS.
Similar issue (both Hibernate and MyBatis don't store milliseconds) was solved by upgrading the MySQL driver from mysql-connector-java-5.1.17.jar to mysql-connector-java-5.1.26.jar.