Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 70256 invoked from network); 11 Sep 2009 23:18:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Sep 2009 23:18:20 -0000 Received: (qmail 66307 invoked by uid 500); 11 Sep 2009 23:18:19 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 66234 invoked by uid 500); 11 Sep 2009 23:18:19 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 66223 invoked by uid 99); 11 Sep 2009 23:18:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Sep 2009 23:18:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Sep 2009 23:18:17 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 728FC234C004 for ; Fri, 11 Sep 2009 16:17:57 -0700 (PDT) Message-ID: <1677432166.1252711077454.JavaMail.jira@brutus> Date: Fri, 11 Sep 2009 16:17:57 -0700 (PDT) From: "Fay Wang (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Resolved: (OPENJPA-1295) Query with Escape '\' fails in MySQL In-Reply-To: <1144171242.1252710717758.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fay Wang resolved OPENJPA-1295. ------------------------------- Resolution: Fixed > 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 > Reporter: Fay Wang > Fix For: 2.0.0 > > > 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.