db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steffen Lutter (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (DERBY-5869) getProcedureColumns doesn't handle escaping in patterns correctly
Date Fri, 20 Jul 2012 13:42:35 GMT

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

Steffen Lutter closed DERBY-5869.

    Resolution: Not A Problem

Description is not accurate, problem is coming from DERBY-5862 
> getProcedureColumns doesn't handle escaping in patterns correctly
> -----------------------------------------------------------------
>                 Key: DERBY-5869
>                 URL: https://issues.apache.org/jira/browse/DERBY-5869
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions:
>            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 "\". The problem is, that derby doesn’t seem to accept
the escaping in case 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: 
> We have a stored procedure MY_PROC.
> getConnection ().getMetaData ().getProcedureColumns (null, null, ”MY\\_PROC” ,"%")
=> Stored proc is not found
> getConnection ().getMetaData ().getProcedureColumns (null, null, ”MY_PROC” ,"%")
=> 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+PROC, 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 administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message