Issue Details (XML | Word | Printable)

Key: DERBY-2030
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Andrew McIntyre
Reporter: Andrew McIntyre
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

'set schema sys' followed by 'show tables' does not show tables in sys schema

Created: 02/Nov/06 05:52 AM   Updated: 14/Nov/06 02:36 AM
Return to search
Component/s: Tools
Affects Version/s: 10.2.1.6, 10.3.1.4
Fix Version/s: 10.2.2.0, 10.3.1.4

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works derby-2030-v1.diff 2006-11-13 11:23 PM Andrew McIntyre 6 kB
File Licensed for inclusion in ASF works ij_showalltables.diff 2006-11-02 05:53 AM Andrew McIntyre 0.7 kB

Resolution Date: 14/Nov/06 02:36 AM


 Description  « Hide
If you create a new database in IJ, followed by 'set schema sys' and then 'show tables', ij shows no tables in the schema. This is because ij's show tables command only shows system tables if a schema is provided.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Andrew McIntyre added a comment - 02/Nov/06 05:53 AM
Attaching simple patch to take care of this issue. Need to also investigate whether we should show other table types if no schema is provided.

Andrew McIntyre made changes - 02/Nov/06 05:53 AM
Field Original Value New Value
Attachment ij_showalltables.diff [ 12344153 ]
Bryan Pendleton added a comment - 04/Nov/06 04:08 PM
Hi Andrew, I applied the patch and it seems to work fine for me. I can see the behavior changes and they are as I expected. I think the new behavior is reasonable.

Are there no tests for this feature in our test suite? I was a little bit surprised that there were no test changes in this patch.


Andrew McIntyre added a comment - 13/Nov/06 11:23 PM
Thanks for the review Bryan, I was just capturing the little patch that I posted for Oystein on the list in this JIRA.

Attaching a complete patch that updates ij7.sql to include a testcase for this issue. I'll commit this shortly if there are no further comments.

Just a note, in the future, it might be nice to have the syntax:

SHOW [ SYSTEM ] TABLES

and then take the system tables out of the results returned by default for SHOW TABLES, but that enhancement should be handled in a different JIRA.

Andrew McIntyre made changes - 13/Nov/06 11:23 PM
Attachment derby-2030-v1.diff [ 12344928 ]
Bryan Pendleton added a comment - 14/Nov/06 12:07 AM
Hi Andrew, the new patch looks great to me. I was able to run the new test both with and without your code change and got the expected results. +1 to your patch, and +1 to your idea about an alternate syntax to let the user control the system table behavior, too.

Repository Revision Date User Message
ASF #474628 Tue Nov 14 02:28:02 UTC 2006 fuzzylogic DERBY-2030: 'show tables' should show system tables.
Files Changed
MODIFY /db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out

Repository Revision Date User Message
ASF #474630 Tue Nov 14 02:33:31 UTC 2006 fuzzylogic DERBY-2030: 'show tables should show system tables. Merge of 474628.
Files Changed
MODIFY /db/derby/code/branches/10.2/java/tools/org/apache/derby/impl/tools/ij/ij.jj
MODIFY /db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out
MODIFY /db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql

Andrew McIntyre added a comment - 14/Nov/06 02:36 AM
Committed to trunk with revision 474628 and 10.2 with revision 474630.

Andrew McIntyre made changes - 14/Nov/06 02:36 AM
Fix Version/s 10.2.1.8 [ 12312096 ]
Resolution Fixed [ 1 ]
Fix Version/s 10.3.0.0 [ 12310800 ]
Derby Info [Patch Available]
Status Open [ 1 ] Resolved [ 5 ]
Andrew McIntyre made changes - 14/Nov/06 02:36 AM
Status Resolved [ 5 ] Closed [ 6 ]