Bug 1153069 - (6.4.0) [HHH-9444] rounding of fractional seconds in MySQL 5.6.4+ can lead to unexpected results
Summary: (6.4.0) [HHH-9444] rounding of fractional seconds in MySQL 5.6.4+ can lead to...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER1
: EAP 6.4.0
Assignee: Gail Badner
QA Contact: Martin Simka
URL:
Whiteboard: dev_no_blocker
Depends On:
Blocks: 1173454 1173461
TreeView+ depends on / blocked
 
Reported: 2014-10-15 14:54 UTC by Martin Simka
Modified: 2019-08-19 12:43 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
: 1173461 (view as bug list)
Environment:
Last Closed: 2019-08-19 12:43:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker EAP6-209 0 Major Closed Validate and Support MySQL 5.7 2017-07-17 10:08:26 UTC
Red Hat Issue Tracker EAP6-340 0 Major Closed Deliver new HIbernate Dialect for MySQL 5.7 2017-07-17 10:08:25 UTC

Description Martin Simka 2014-10-15 14:54:04 UTC
*Description of problem:
https://hibernate.atlassian.net/browse/HHH-9444

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

// change a non-id property, but do not persist
Date persistedTimestamp = record.getTimestamp();
Date newTimestamp = new Date(persistedTimestamp.getTime() + 1);
record.setTimestamp(newTimestamp);

assertEquals( df.format(persistedTimestamp), df.format(found) );


*Version-Release number of selected component (if applicable):
Hibernate-orm 4.2.14.SP1

Comment 4 JBoss JIRA Server 2014-11-24 12:13:51 UTC
Pavel Janousek <pjanouse> updated the status of jira EAP6-209 to Reopened

Comment 13 Gail Badner 2014-12-18 21:29:04 UTC
This BZ references HHH-9444, which has to do with test failures. The tests failures are fixed by the new dialect added for HHH-8401.

Should this BZ reference HHH-8401 instead?

Comment 14 Carlo de Wolf 2015-01-05 10:15:33 UTC
HHH-9444 references back to HHH-8401, so I consider the breadcrumb trail complete.

Comment 15 Kabir Khan 2015-01-06 13:32:56 UTC
Hibernate upgrade 4.2.17.Final-redhat-1/https://bugzilla.redhat.com/show_bug.cgi?id=1173454 should have fixed this

Comment 16 JBoss JIRA Server 2015-01-13 20:53:13 UTC
Kabir Khan <kabir.khan> updated the status of jira EAP6-209 to Resolved

Comment 17 Martin Simka 2015-01-20 14:01:18 UTC
verified on EAP 6.4.0.ER1

Comment 18 JBoss JIRA Server 2015-04-28 15:04:10 UTC
John Doyle <jdoyle> updated the status of jira EAP6-340 to Closed

Comment 19 JBoss JIRA Server 2015-04-28 15:05:15 UTC
John Doyle <jdoyle> updated the status of jira EAP6-209 to Closed


Note You need to log in before you can comment on or make changes to this bug.