[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2945?page=c...
]
Thom Hehl commented on HHH-2945:
--------------------------------
I did consider those. That is why I went to the Redhat Linux system and ran SQuirelL with
the same query, the same JDBC driver and the same JDBC connection string and the same java
runtime environment. This returned the correct results. To me, this, along with the way
the information is reported in the debug information, leads me to believe that this is a
hibernate issue.
I have provided source code. What do I need to give you to have a reproducible test case
seeing that you do not have my database?
SELECT COUNT(*) fails on Linux but not on Windows XP
----------------------------------------------------
Key: HHH-2945
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2945
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.5
Environment: Windows XP/Redhat Linux
Reporter: Thom Hehl
While working with an Informix database hosting on Linux, I tested my web application
running on my windows XP workstation with the following query genereated by hibernate:
(From P6 spy)
select count(*) as col_0_0_ from POOL poolinfo0_ where
poolinfo0_.DEF_DATE='2008-02-11 00:00:00.0' and
poolinfo0_.DIVISION_CODE='3'
When I run this against my database, it returns the proper number every single time.
I moved my web application to our Redhat Linux environment (platform for client) and ran
the application and this same query against the same database returns 0 every single
time.
When I run the same query from SQuirreL on the Redhat Linux box using the same JDBC
driver as the webapp uses, it returns the proper values. To me, this points to hibernate
as the issue.
Here is the debugs:
64854 DEBUG org.hibernate.jdbc.AbstractBatcher | preparing statement
64856 DEBUG org.hibernate.type.CalendarType | binding '2008-02-11 00:00:00' to
parameter: 1
64856 DEBUG org.hibernate.type.StringType | binding '3' to parameter: 2
64899 DEBUG org.hibernate.jdbc.AbstractBatcher | about to open ResultSet (open
ResultSets: 0, globally: 0)
64899 DEBUG org.hibernate.loader.Loader | processing result set
64899 DEBUG org.hibernate.loader.Loader | result set row: 0
64899 DEBUG org.hibernate.loader.Loader | result row:
64899 DEBUG org.hibernate.type.LongType | returning '0' as column: col_0_0_
64899 DEBUG org.hibernate.loader.Loader | done processing result set (1 rows)
64899 DEBUG org.hibernate.jdbc.AbstractBatcher | about to close ResultSet (open
ResultSets: 1, globally: 1)
64899 DEBUG org.hibernate.jdbc.AbstractBatcher | about to close PreparedStatement (open
PreparedStatements: 1, globally: 1)
Thanks.
--
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