[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2445?page=c...
]
Don Smith commented on HHH-2445:
--------------------------------
This bug is invalid. It was caused by an incorrectly defined return type for a function
definition in a custom dialect. Hibernate.INTEGER instead of HIBERNATE.LONG.
Wrong data type used for MySQL timestampdiff(FRAC_SECOND, date1,
date2)
-----------------------------------------------------------------------
Key: HHH-2445
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2445
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.0.ga
Environment: MySQL 5.0.27, Connector/J 5.0.4, SUSE Linux Enterprise Desktop 10
Reporter: Don Smith
The following HQL
List results = executeQuery("select timestampdiff(FRAC_SECOND, startDate, endDate)
from IntervalTracker order by id");
throws this stack trace:
org.hibernate.exception.DataException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2211)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2092)
at org.hibernate.loader.Loader.list(Loader.java:2087)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at
com.novell.soa.persist.HibernateDateDiffTest.executeQuery(HibernateDateDiffTest.java:152)
at
com.novell.soa.persist.HibernateDateDiffTest.testDateDiff(HibernateDateDiffTest.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
at junit.extensions.TestSetup.run(TestSetup.java:23)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: com.mysql.jdbc.exceptions.MySQLDataException: '3605940000000' in
column '1' is outside valid range for the datatype INTEGER.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:893)
at com.mysql.jdbc.ResultSet.throwRangeException(ResultSet.java:7391)
at com.mysql.jdbc.ResultSet.getNativeInt(ResultSet.java:3967)
at com.mysql.jdbc.ResultSet.getNativeInt(ResultSet.java:3892)
at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:2555)
at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:2570)
at org.hibernate.type.IntegerType.get(IntegerType.java:28)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:161)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:150)
at org.hibernate.loader.hql.QueryLoader.getResultColumnOrRow(QueryLoader.java:333)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:594)
at org.hibernate.loader.Loader.doQuery(Loader.java:689)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2208)
... 38 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira