[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4580?page=c...
]
Steve Ebersole commented on HHH-4580:
-------------------------------------
Actually I am wondering if the test case itself might have to do with null comparisons.
The test basically builds a disjunction predicate like:
( OR^ (ex) (NOT ex) )
So... give me everything that matches either (1) ex or (2) NOT ex. In theory that should
be everything. However ANSI SQL says that any comparision involving NULLs should always
evaluate to UNKNOWN. So even though there are a total of 3 records in the db only 2
should match because of that null-comparison rule. Both Sybase and SQL Server treat null
comparisons in a manner other than what is described by ANSI SQL. Specifically I think
they say here that "NULL LIKE 'something%'" evaluates to FALSE and
therefore the negation (NOT) of that evaluates to TRUE.
You say that this is a different server (15 versus 12.5). Was this 15 server set up with
the option "set ansinull on"? I'll follow up with Red Hat QE who own these
boxes to verify.
As for your experienced discrepency between a literal match-string and a parameterized
match-string, dunno. That sure sounds like I bug in the driver or database. I'll
look after I follow up with QE
Possible Sybase bug causes AssertionFailure in QueryByExampleTest
-----------------------------------------------------------------
Key: HHH-4580
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4580
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.2.4.sp1, 3.3.2, 3.5.0.Beta-1, 3.5.0-Beta-2
Environment: sybase 15
Reporter: Strong Liu
Test QueryByExampleTest.testJunctionNotExpressionQBE fails due to a possible bug in
Sybase 15. The same test passes for Sybase 12.5. The test expects two records as a result
for a query, but it gets 3. After some debugging with the query that Hibernate generated,
I end up with these two simpler ones:
select id from Componentizable where not (name like ? and subName1 like ?)
select id from Componentizable where not (name like 'hibernate' and subName1 like
'ope%')
The first one returns three records, while the second returns two. The interesting part
is that if I replace the first parameter in the first query by a hardcoded value
("hibernate"), it still returns 3 records. That means that the problem is
probably with the binding of JDBC parameters containing a wildcard % .
--
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