You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by fu...@apache.org on 2006/11/14 03:33:32 UTC
svn commit: r474630 - in /db/derby/code/branches/10.2/java:
testing/org/apache/derbyTesting/functionTests/master/ij7.out
testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql
tools/org/apache/derby/impl/tools/ij/ij.jj
Author: fuzzylogic
Date: Mon Nov 13 18:33:31 2006
New Revision: 474630
URL: http://svn.apache.org/viewvc?view=rev&rev=474630
Log:
DERBY-2030: 'show tables should show system tables. Merge of 474628.
Modified:
db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out
db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql
db/derby/code/branches/10.2/java/tools/org/apache/derby/impl/tools/ij/ij.jj
Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out?view=diff&rev=474630&r1=474629&r2=474630
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out Mon Nov 13 18:33:31 2006
@@ -17,7 +17,33 @@
-- This test will cover SHOW TABLES, SHOW SCHEMAS, etc.
-- and the DESCRIBE command.
connect 'jdbc:derby:wombat;create=true';
-ij> SET SCHEMA = APP;
+ij> -- first, set schema to sys and demonstrate that we can see the system tables.
+SET SCHEMA SYS;
+0 rows inserted/updated/deleted
+ij> SHOW TABLES;
+TABLE_SCHEM |TABLE_NAME |REMARKS
+------------------------------------------------------------------------
+SYS |SYSALIASES |
+SYS |SYSCHECKS |
+SYS |SYSCOLPERMS |
+SYS |SYSCOLUMNS |
+SYS |SYSCONGLOMERATES |
+SYS |SYSCONSTRAINTS |
+SYS |SYSDEPENDS |
+SYS |SYSFILES |
+SYS |SYSFOREIGNKEYS |
+SYS |SYSKEYS |
+SYS |SYSROUTINEPERMS |
+SYS |SYSSCHEMAS |
+SYS |SYSSTATEMENTS |
+SYS |SYSSTATISTICS |
+SYS |SYSTABLEPERMS |
+SYS |SYSTABLES |
+SYS |SYSTRIGGERS |
+SYS |SYSVIEWS |
+SYSIBM |SYSDUMMY1 |
+19 rows selected
+ij> SET SCHEMA APP;
0 rows inserted/updated/deleted
ij> CREATE TABLE t1 (i int generated always as identity, d DECIMAL(5,2), test VARCHAR(20));
0 rows inserted/updated/deleted
@@ -41,9 +67,28 @@
SHOW TABLES;
TABLE_SCHEM |TABLE_NAME |REMARKS
------------------------------------------------------------------------
+SYS |SYSALIASES |
+SYS |SYSCHECKS |
+SYS |SYSCOLPERMS |
+SYS |SYSCOLUMNS |
+SYS |SYSCONGLOMERATES |
+SYS |SYSCONSTRAINTS |
+SYS |SYSDEPENDS |
+SYS |SYSFILES |
+SYS |SYSFOREIGNKEYS |
+SYS |SYSKEYS |
+SYS |SYSROUTINEPERMS |
+SYS |SYSSCHEMAS |
+SYS |SYSSTATEMENTS |
+SYS |SYSSTATISTICS |
+SYS |SYSTABLEPERMS |
+SYS |SYSTABLES |
+SYS |SYSTRIGGERS |
+SYS |SYSVIEWS |
+SYSIBM |SYSDUMMY1 |
APP |T1 |
USER1 |T2 |
-2 rows selected
+21 rows selected
ij> SHOW TABLES IN APP;
TABLE_SCHEM |TABLE_NAME |REMARKS
------------------------------------------------------------------------
Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql?view=diff&rev=474630&r1=474629&r2=474630
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql Mon Nov 13 18:33:31 2006
@@ -20,7 +20,11 @@
connect 'jdbc:derby:wombat;create=true';
-SET SCHEMA = APP;
+-- first, set schema to sys and demonstrate that we can see the system tables.
+SET SCHEMA SYS;
+SHOW TABLES;
+
+SET SCHEMA APP;
CREATE TABLE t1 (i int generated always as identity, d DECIMAL(5,2), test VARCHAR(20));
CREATE SCHEMA USER1;
Modified: db/derby/code/branches/10.2/java/tools/org/apache/derby/impl/tools/ij/ij.jj
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/tools/org/apache/derby/impl/tools/ij/ij.jj?view=diff&rev=474630&r1=474629&r2=474630
==============================================================================
--- db/derby/code/branches/10.2/java/tools/org/apache/derby/impl/tools/ij/ij.jj (original)
+++ db/derby/code/branches/10.2/java/tools/org/apache/derby/impl/tools/ij/ij.jj Mon Nov 13 18:33:31 2006
@@ -1648,12 +1648,7 @@
[ <IN> schema=identifier() ]
{
if(t!=null) {
- // Only show non-system tables by default.
- // If schema specified (i.e. SYS), also display system tables.
- if(schema!=null)
- types = new String[] { "TABLE", "SYSTEM TABLE" };
- else
- types = new String[] { "TABLE" };
+ types = new String[] { "TABLE", "SYSTEM TABLE" };
}
else if(v!=null)
types = new String[] { "VIEW" };