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

Jørgen Løland updated DERBY-2222:
---------------------------------

    Attachment: DERBY-2222-2.stat
                DERBY-2222-2.diff

Thanks for the comments, Knut. I have addressed them in patch
DERBY-2222-2.diff, as commented below. 

Since I am new to Derby, I am not sure if all the following test
information is required, but to much info is probably better than
to little: Patch (2) initially failed
derbyall (store/bootLock.java) and allsuites (synonym.sql in
LangScripts); in the synonym test "drop synonym mySyn;" (line 237
in synonym.sql), the views were listed in the reverse order
compared to the master file. Both failures disappeared after ant
clobber/svn update. The full tests have not been rerun after
this.


> Knut Anders Hatlen commented on DERBY-2222:
> -------------------------------------------
> 
> Hi Jørgen,
> I think you have found a good solution. Some comments to the attached code:
> 1) If you do "svn add" on ijMultipleResultSetResult.java, it will be included 
> in the output from "svn diff" and you don't need to attach the file 
> separately.

Done. Thanks for the tip.

> 2) indent_DisplayMultipleResults() seems to be very similar to 
> indent_DisplayResults(). Is it possible to make indent_DisplayResults() more 
> general (for instance, let it take an array/list of result sets) and use that 
> method both in DisplayResults() and DisplayMultipleResults()?

A good point. I more or less cut'n pasted that method in the first diff file. I 
have now rewritten these to one single method.

> 3) Derby code normally uses 4 blanks for indentation.

Fixed

> 4) Perhaps you could add a test case for "show indexes in schemaname" so it 
> is tested by the regression tests. Some other usages of "show indexes" are 
> tested in tools/ij7.sql.

Added one test to this file. 

> 'show indexes in SCHEMANAME' does not work with the client driver
> -----------------------------------------------------------------
>
>                 Key: DERBY-2222
>                 URL: https://issues.apache.org/jira/browse/DERBY-2222
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client, Tools
>    Affects Versions: 10.2.2.0, 10.3.0.0
>            Reporter: Kristian Waagan
>         Assigned To: Jørgen Løland
>         Attachments: DERBY-2222-1.diff, DERBY-2222-1.stat, DERBY-2222-2.diff, 
> DERBY-2222-2.stat, ijMultipleResultSetResult.java
>
>
> The ij command 'show indexes in SCHEMANAME' does not work at all with the 
> client driver.
> It does work with the embedded driver.
> Sample output from ij:
> ij> connect 'jdbc:derby://localhost/myDB;create=true';
> ij> create table test (id int primary key);
> 0 rows inserted/updated/deleted
> ij> show indexes in app;
> ERROR XJ103: Table name can not be null
> ij> show indexes from test;
> TABLE_NAME          |COLUMN_NAME         |NON_U&|TYPE|ASC&|CARDINA&|PAGES
> ----------------------------------------------------------------------------
> TEST                |ID                  |0     |3   |A   |NULL    |NULL
> 1 row selected
> ij> show indexes from app.test;
> TABLE_NAME          |COLUMN_NAME         |NON_U&|TYPE|ASC&|CARDINA&|PAGES
> ----------------------------------------------------------------------------
> TEST                |ID                  |0     |3   |A   |NULL    |NULL
> 1 row selected
> ij>
> Using delimited table and/or schema names does not work, but I think this is 
> according to documentation.
> I.e.:
> ij> show indexes from "TEST";
> ERROR 42X01: Syntax error: Encountered "show" at line 1, column 1.
> ij> show indexes from "APP".test;
> ERROR 42X01: Syntax error: Encountered "show" at line 1, column 1.
> ij> show indexes from "APP"."TEST";
> ERROR 42X01: Syntax error: Encountered "show" at line 1, column 1.
> ij>

-- 
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