db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From be...@apache.org
Subject svn commit: r548252 - /db/derby/code/branches/10.3/java/client/org/apache/derby/client/am/DatabaseMetaData.java
Date Mon, 18 Jun 2007 07:59:07 GMT
Author: bernt
Date: Mon Jun 18 00:59:06 2007
New Revision: 548252

URL: http://svn.apache.org/viewvc?view=rev&rev=548252
Log:
DERBY-2607 Merged from trunk

Modified:
    db/derby/code/branches/10.3/java/client/org/apache/derby/client/am/DatabaseMetaData.java

Modified: db/derby/code/branches/10.3/java/client/org/apache/derby/client/am/DatabaseMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/client/org/apache/derby/client/am/DatabaseMetaData.java?view=diff&rev=548252&r1=548251&r2=548252
==============================================================================
--- db/derby/code/branches/10.3/java/client/org/apache/derby/client/am/DatabaseMetaData.java
(original)
+++ db/derby/code/branches/10.3/java/client/org/apache/derby/client/am/DatabaseMetaData.java
Mon Jun 18 00:59:06 2007
@@ -1769,6 +1769,11 @@
                                        String table) throws SqlException {
         checkForClosedConnectionX();
 
+        // validate the table name       
+        if (table == null) {
+            throw new SqlException(agent_.logWriter_,
+                new ClientMessageId(SQLState.TABLE_NAME_CANNOT_BE_NULL)); 
+        }
         PreparedStatement cs = prepareMetaDataQuery("SYSIBM.SQLFOREIGNKEYS(?,?,?,?,?,?,?)");
 
         cs.setStringX(1, "");
@@ -1821,6 +1826,11 @@
         checkForClosedConnectionX();
         ;
 
+        // validate the table name
+        if (table == null) {
+            throw new SqlException(agent_.logWriter_,
+                new ClientMessageId(SQLState.TABLE_NAME_CANNOT_BE_NULL)); 
+        }        
         PreparedStatement cs = prepareMetaDataQuery("SYSIBM.SQLFOREIGNKEYS(?,?,?,?,?,?,?)");
 
         cs.setStringX(1, catalog);



Mime
View raw message