Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5670D9334 for ; Fri, 20 Jul 2012 11:34:36 +0000 (UTC) Received: (qmail 82785 invoked by uid 500); 20 Jul 2012 11:34:36 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 82773 invoked by uid 500); 20 Jul 2012 11:34:35 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 82747 invoked by uid 99); 20 Jul 2012 11:34:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2012 11:34:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 0D40A141826 for ; Fri, 20 Jul 2012 11:34:34 +0000 (UTC) Date: Fri, 20 Jul 2012 11:34:33 +0000 (UTC) From: "Steffen Lutter (JIRA)" To: derby-dev@db.apache.org Message-ID: <2041814131.81426.1342784075055.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Created] (DERBY-5869) getProcedureColumns doesn't handle escaping in patterns correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Steffen Lutter created DERBY-5869: ------------------------------------- Summary: getProcedureColumns doesn't handle escaping in patter= ns correctly Key: DERBY-5869 URL: https://issues.apache.org/jira/browse/DERBY-5869 Project: Derby Issue Type: Bug Components: JDBC Affects Versions: 10.9.1.0 Reporter: Steffen Lutter When querying the procedure columns, according to the JDBC standard pattern= characters are escaped, like _ and % if necessary. The escape character is= here taken from the function getSearchStringEscape(), which returns "\". T= he problem is, that derby doesn=E2=80=99t seem to accept the escaping in ca= se of _ (underscore), and uses the escape characters within the match which= leads to the situation that the stored proc is not found (Exception thrown= ) Example:=20 We have a stored procedure MY_PROC. getConnection ().getMetaData ().getProcedureColumns (null, null, =E2=80=9DM= Y\\_PROC=E2=80=9D ,"%") =3D> Stored proc is not found getConnection ().getMetaData ().getProcedureColumns (null, null, =E2=80=9DM= Y_PROC=E2=80=9D ,"%") =3D> Stored proc is found The first case is the problem, as the _ needs escaping. For the second case= it works, even though theoretically also procedures called MY-PROC, MY+PRO= C, MYXPROC would match. http://docs.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira