db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r395878 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/jdbc/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ testing/org/apache/derbyTesting/functionTests/ma...
Date Fri, 21 Apr 2006 13:30:49 GMT
Author: kahatlen
Date: Fri Apr 21 06:30:45 2006
New Revision: 395878

URL: http://svn.apache.org/viewcvs?rev=395878&view=rev
Log:
DERBY-876: DatabaseMetaData.getSchemas() is not JDBC 3.0 compliant

Added missing column to the result set returned by
EmbedDatabaseMetaData.getSchemas().

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/metadata.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Upgrade_10_1_10_2.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java?rev=395878&r1=395877&r2=395878&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
Fri Apr 21 06:30:45 2006
@@ -1733,17 +1733,18 @@
      * Get the schema names available in this database.  The results
      * are ordered by schema name.
      *
-     * <P>The schema column is:
+     * <P>The schema columns are:
      *  <OL>
-     *	<LI><B>TABLE_SCHEM</B> String => schema name
+     *  <li><strong>TABLE_SCHEM</strong> String =&gt; schema name</li>
+     *  <li><strong>TABLE_CATALOG</strong> String =&gt; catalog name
+     *  (may be <code>null</code>)</li>
      *  </OL>
      *
-     * @return ResultSet - each row has a single String column that is a
-     * schema name
+     * @return ResultSet - each row is a schema description
 	 * @exception SQLException thrown on failure.
      */
 	public ResultSet getSchemas() throws SQLException {
-		return getSimpleQuery("getSchemas");
+		return getSchemas(null, null);
 	}
 
     /**
@@ -3310,7 +3311,7 @@
     public ResultSet getSchemas(String catalog, String schemaPattern)
         throws SQLException
     {
-        PreparedStatement s = getPreparedQuery("getSchemasWithParams");
+        PreparedStatement s = getPreparedQuery("getSchemas");
         s.setString(1, swapNull(catalog));
         s.setString(2, swapNull(schemaPattern));
         return s.executeQuery();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/metadata.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/metadata.properties?rev=395878&r1=395877&r2=395878&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/metadata.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/metadata.properties Fri Apr
21 06:30:45 2006
@@ -74,18 +74,10 @@
 	ORDER BY PROCEDURE_SCHEM, PROCEDURE_NAME, SPECIFIC_NAME
 # getSchemas
 #
-getSchemas=\
-	SELECT SCHEMANAME AS TABLE_SCHEM \
-	FROM SYS.SYSSCHEMAS \
-	ORDER BY TABLE_SCHEM
-
-#
-# getSchemas with parameters - new with JDK 1.6
-#
 # parameter 1 = catalog name pattern  (not used)
 # parameter 2 = schema name pattern
 #
-getSchemasWithParams=\
+getSchemas=\
         SELECT SCHEMANAME AS TABLE_SCHEM, \
           CAST(NULL AS VARCHAR(128)) AS TABLE_CATALOG \
           FROM SYS.SYSSCHEMAS \

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out?rev=395878&r1=395877&r2=395878&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
Fri Apr 21 06:30:45 2006
@@ -18,18 +18,18 @@
 allTablesAreSelectable(): true
 maxColumnNameLength(): 128
 getSchemas():
-TABLE_SCHEM[VARCHAR]
-APP
-NULLID
-SQLJ
-SYS
-SYSCAT
-SYSCS_DIAG
-SYSCS_UTIL
-SYSFUN
-SYSIBM
-SYSPROC
-SYSSTAT
+TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
+APP,null
+NULLID,null
+SQLJ,null
+SYS,null
+SYSCAT,null
+SYSCS_DIAG,null
+SYSCS_UTIL,null
+SYSFUN,null
+SYSIBM,null
+SYSPROC,null
+SYSSTAT,null
 getCatalogs():
 TABLE_CAT[CHAR]
 getSearchStringEscape(): 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out?rev=395878&r1=395877&r2=395878&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
Fri Apr 21 06:30:45 2006
@@ -48,18 +48,18 @@
 allTablesAreSelectable(): true
 maxColumnNameLength(): 128
 getSchemas():
-TABLE_SCHEM[VARCHAR]
-APP
-NULLID
-SQLJ
-SYS
-SYSCAT
-SYSCS_DIAG
-SYSCS_UTIL
-SYSFUN
-SYSIBM
-SYSPROC
-SYSSTAT
+TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
+APP,null
+NULLID,null
+SQLJ,null
+SYS,null
+SYSCAT,null
+SYSCS_DIAG,null
+SYSCS_UTIL,null
+SYSFUN,null
+SYSIBM,null
+SYSPROC,null
+SYSSTAT,null
 getCatalogs():
 TABLE_CAT[CHAR]
 getSearchStringEscape(): 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out?rev=395878&r1=395877&r2=395878&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/metadata.out
Fri Apr 21 06:30:45 2006
@@ -18,18 +18,18 @@
 allTablesAreSelectable(): true
 maxColumnNameLength(): 128
 getSchemas():
-TABLE_SCHEM[VARCHAR]
-APP
-NULLID
-SQLJ
-SYS
-SYSCAT
-SYSCS_DIAG
-SYSCS_UTIL
-SYSFUN
-SYSIBM
-SYSPROC
-SYSSTAT
+TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
+APP,null
+NULLID,null
+SQLJ,null
+SYS,null
+SYSCAT,null
+SYSCS_DIAG,null
+SYSCS_UTIL,null
+SYSFUN,null
+SYSIBM,null
+SYSPROC,null
+SYSSTAT,null
 getSchemas(String, String):
 TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
 APP,null

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out?rev=395878&r1=395877&r2=395878&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
Fri Apr 21 06:30:45 2006
@@ -18,18 +18,18 @@
 allTablesAreSelectable(): true
 maxColumnNameLength(): 128
 getSchemas():
-TABLE_SCHEM[VARCHAR]
-APP
-NULLID
-SQLJ
-SYS
-SYSCAT
-SYSCS_DIAG
-SYSCS_UTIL
-SYSFUN
-SYSIBM
-SYSPROC
-SYSSTAT
+TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
+APP,null
+NULLID,null
+SQLJ,null
+SYS,null
+SYSCAT,null
+SYSCS_DIAG,null
+SYSCS_UTIL,null
+SYSFUN,null
+SYSIBM,null
+SYSPROC,null
+SYSSTAT,null
 getSchemas(String, String):
 TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
 APP,null

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out?rev=395878&r1=395877&r2=395878&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
Fri Apr 21 06:30:45 2006
@@ -48,18 +48,18 @@
 allTablesAreSelectable(): true
 maxColumnNameLength(): 128
 getSchemas():
-TABLE_SCHEM[VARCHAR]
-APP
-NULLID
-SQLJ
-SYS
-SYSCAT
-SYSCS_DIAG
-SYSCS_UTIL
-SYSFUN
-SYSIBM
-SYSPROC
-SYSSTAT
+TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
+APP,null
+NULLID,null
+SQLJ,null
+SYS,null
+SYSCAT,null
+SYSCS_DIAG,null
+SYSCS_UTIL,null
+SYSFUN,null
+SYSIBM,null
+SYSPROC,null
+SYSSTAT,null
 getSchemas(String, String):
 TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
 APP,null

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Upgrade_10_1_10_2.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Upgrade_10_1_10_2.out?rev=395878&r1=395877&r2=395878&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Upgrade_10_1_10_2.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Upgrade_10_1_10_2.out
Fri Apr 21 06:30:45 2006
@@ -708,18 +708,18 @@
 allTablesAreSelectable(): true
 maxColumnNameLength(): 128
 getSchemas():
-TABLE_SCHEM[VARCHAR]
-APP
-NULLID
-SQLJ
-SYS
-SYSCAT
-SYSCS_DIAG
-SYSCS_UTIL
-SYSFUN
-SYSIBM
-SYSPROC
-SYSSTAT
+TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
+APP,null
+NULLID,null
+SQLJ,null
+SYS,null
+SYSCAT,null
+SYSCS_DIAG,null
+SYSCS_UTIL,null
+SYSFUN,null
+SYSIBM,null
+SYSPROC,null
+SYSSTAT,null
 getSchemas(String, String):
 TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
 APP,null
@@ -2125,18 +2125,18 @@
 allTablesAreSelectable(): true
 maxColumnNameLength(): 128
 getSchemas():
-TABLE_SCHEM[VARCHAR]
-APP
-NULLID
-SQLJ
-SYS
-SYSCAT
-SYSCS_DIAG
-SYSCS_UTIL
-SYSFUN
-SYSIBM
-SYSPROC
-SYSSTAT
+TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
+APP,null
+NULLID,null
+SQLJ,null
+SYS,null
+SYSCAT,null
+SYSCS_DIAG,null
+SYSCS_UTIL,null
+SYSFUN,null
+SYSIBM,null
+SYSPROC,null
+SYSSTAT,null
 getSchemas(String, String):
 TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
 APP,null

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out?rev=395878&r1=395877&r2=395878&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
Fri Apr 21 06:30:45 2006
@@ -18,18 +18,18 @@
 allTablesAreSelectable(): true
 maxColumnNameLength(): 128
 getSchemas():
-TABLE_SCHEM[VARCHAR]
-APP
-NULLID
-SQLJ
-SYS
-SYSCAT
-SYSCS_DIAG
-SYSCS_UTIL
-SYSFUN
-SYSIBM
-SYSPROC
-SYSSTAT
+TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
+APP,null
+NULLID,null
+SQLJ,null
+SYS,null
+SYSCAT,null
+SYSCS_DIAG,null
+SYSCS_UTIL,null
+SYSFUN,null
+SYSIBM,null
+SYSPROC,null
+SYSSTAT,null
 getSchemas(String, String):
 TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
 APP,null

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out?rev=395878&r1=395877&r2=395878&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
Fri Apr 21 06:30:45 2006
@@ -48,18 +48,18 @@
 allTablesAreSelectable(): true
 maxColumnNameLength(): 128
 getSchemas():
-TABLE_SCHEM[VARCHAR]
-APP
-NULLID
-SQLJ
-SYS
-SYSCAT
-SYSCS_DIAG
-SYSCS_UTIL
-SYSFUN
-SYSIBM
-SYSPROC
-SYSSTAT
+TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
+APP,null
+NULLID,null
+SQLJ,null
+SYS,null
+SYSCAT,null
+SYSCS_DIAG,null
+SYSCS_UTIL,null
+SYSFUN,null
+SYSIBM,null
+SYSPROC,null
+SYSSTAT,null
 getSchemas(String, String):
 TABLE_SCHEM[VARCHAR],TABLE_CATALOG[VARCHAR]
 APP,null



Mime
View raw message