The temporal datatypes 'TIME/DATETIME/TIMESTAMP' supports fractional values starting from MySQL 5.6.4 version.
See: http://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
Without defining the number of fractional decimals it defaults to 0. In this case '2013-04-01 23:59:59.500' rounds to '2013-04-02 00:00:00'.
This affects tests in test suite: example from: org.hibernate.test.cid.CompositeIdWithGeneratorTest.testDetachedProperty
Date persistedTimestamp = record.getTimestamp();
Date newTimestamp = new Date(persistedTimestamp.getTime() + 1);
record.setTimestamp(newTimestamp);
assertEquals( df.format(persistedTimestamp), df.format(found) );
There is more tests affected by this, I'll put list in comments
|