openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Woods (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-1295) Query with Escape '\' fails in MySQL
Date Tue, 22 Sep 2009 20:14:16 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Donald Woods updated OPENJPA-1295:
----------------------------------

    Affects Version/s:     (was: 2.0.0)
                       2.0.0-M2
        Fix Version/s:     (was: 2.0.0)
                       2.0.0-M3
             Assignee: Fay Wang

> Query with Escape '\' fails in MySQL
> ------------------------------------
>
>                 Key: OPENJPA-1295
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1295
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 2.0.0-M2
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>             Fix For: 2.0.0-M3
>
>
> The following jpql fails in MySQL: 
> Select e from Employee e where e.name LIKE :name ESCAPE '\'
> The exception trace:
> You have an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near ''\')' at line 1 {prepstmnt 1239002810 SELECT
t0.empId, t0.hireDate, t0.hireTime, t0.hireTimestamp, t0.name, t0.someLong, t0.statusId FROM
SUBQ_EMPLOYEE t0 WHERE (t0.name LIKE ? ESCAPE '\') [params=(String) M\%%]} [code=1064, state=42000]
> at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4587)
> at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4540)
> The test case is org.apache.openjpa.persistence.query.TestQueryEscapeCharacters.testEscapedQuery
 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message