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

Strong Liu (JIRA) noreply at atlassian.com
Wed Nov 18 06:03:08 EST 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Strong Liu resolved HHH-4580.
-----------------------------

    Resolution: Won't Fix

from juca(JBPAPP-3069):
I have "sa" rights in the database, so, I can change it. I tried to find the command to set it for all connections for a given database, but I couldn't yet. Anyway, I added the below line to the test (locally) and it passes, confirming that the "ansinull" option is indeed the "guilty" in this case:

        s.connection().createStatement().execute("set ansinull on");

This line shouldn't go into the test case, I added it only locally to verify if this option affects the test. 

> 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.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list