[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2945?page=c...
]
Max Rydahl Andersen commented on HHH-2945:
------------------------------------------
Running sql via squirell means (at least it did some time back) to run with non-prepared
statement and it thus dependent on the driver a very different result.
Your result shows it process 1 row and nothing else ... and you did not provide any test
case besides what is already executed in our unittests and these are not OS specific.
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