[ 
https://issues.apache.org/jira/browse/DERBY-4430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776442#action_12776442
 ] 

Knut Anders Hatlen commented on DERBY-4430:
-------------------------------------------

I ran all the regression tests, and found that there's one problem that makes 
many of the derbyall tests fail. The problem is that the identifier() method 
now requires that there is a connection, whereas it is used by some ij commands 
that don't require that there is currently a connection to the database. One 
example is the CONNECT command, which now fails if the connection is named:

ij> connect 'jdbc:derby:test;create=true' as c1;
IJ ERROR: Unable to establish connection

I think we need to make sure that the new identifier() method is only used by 
the SHOW and DESCRIBE commands that reference objects in the database.

> Make ij's SHOW and DESCRIBE commands more db agnostic
> -----------------------------------------------------
>
>                 Key: DERBY-4430
>                 URL: https://issues.apache.org/jira/browse/DERBY-4430
>             Project: Derby
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 10.6.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Sylvain Leroux
>            Priority: Minor
>         Attachments: DERBY-4430.ij.out, DERBY-4430.patch, DERBY-4430.sql
>
>
> ij's SHOW and DESCRIBE commands use DatabaseMetaData in order to be portable 
> to other databases than Derby, and in many cases they work fine with other 
> databases. However, the variants of the commands that take a table name or a 
> schema name assume that unquoted identifiers are converted to and stored in 
> upper case internally. This is not true for all databases, and since these 
> commands don't accept quoted identifiers, there's currently no way to access 
> tables/schemas that are not all upper case.
> One possible fix is to make the identifier() method in ij.jj use the 
> DatabaseMetaData methods storesLowerCaseIdentifiers(), 
> storesMixedCaseIdentifiers() and storesUpperCaseIdentifiers() to decide 
> whether it should convert the identifier to lower case, keep it unchanged, or 
> convert it to upper case. Currently, that method always converts the 
> identifiers to upper case.

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

Reply via email to