db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fuzzylo...@apache.org
Subject svn commit: r474628 - in /db/derby/code/trunk/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
Date Tue, 14 Nov 2006 02:28:03 GMT
Author: fuzzylogic
Date: Mon Nov 13 18:28:02 2006
New Revision: 474628

URL: http://svn.apache.org/viewvc?view=rev&rev=474628
Log:
DERBY-2030: 'show tables' should show system tables.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out?view=diff&rev=474628&r1=474627&r2=474628
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out
Mon Nov 13 18:28:02 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/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql?view=diff&rev=474628&r1=474627&r2=474628
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql
Mon Nov 13 18:28:02 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/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj?view=diff&rev=474628&r1=474627&r2=474628
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj Mon Nov 13 18:28:02
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" };



Mime
View raw message