[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4580) Possible Sybase bug causes AssertionFailure in QueryByExampleTest

Strong Liu (JIRA) noreply at atlassian.com
Mon Aug 29 10:59:02 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43378#comment-43378 ] 

Strong Liu commented on HHH-4580:
---------------------------------

add "set ansinull on" in hibernate-parent/pom.xml
ANSI NULL mode – “val = NULL” is unknown when “val” is NULL
The ANSI rule for the where and on clauses return rows that are true, and rejects rows that are both false and unknown.

> 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
>            Assignee: Steve Ebersole
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list