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.

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.

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.

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