Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 58890 invoked from network); 15 Aug 2007 22:22:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Aug 2007 22:22:01 -0000 Received: (qmail 94366 invoked by uid 500); 15 Aug 2007 22:21:59 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 94336 invoked by uid 500); 15 Aug 2007 22:21:59 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 94325 invoked by uid 99); 15 Aug 2007 22:21:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Aug 2007 15:21:59 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Aug 2007 22:22:16 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D1F1F1A981C; Wed, 15 Aug 2007 15:21:36 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r566359 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/jdbc/ testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ testing/org/apache/derbyTesting/junit/ tools/org/apache/derby/impl/tools/ij/ Date: Wed, 15 Aug 2007 22:21:35 -0000 To: derby-commits@db.apache.org From: kmarsden@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070815222136.D1F1F1A981C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kmarsden Date: Wed Aug 15 15:21:32 2007 New Revision: 566359 URL: http://svn.apache.org/viewvc?view=rev&rev=566359 Log: DERBY-3000 - getTables() call with 10.3 causes java.sql.SQLException: The parameter position '8' is out of range. The number of parameters for this prepared statement is '7'. DERBY-1790 - DatabaseMetaData.getTables() with passed in table type of SYNONYM returns system tables and not SYNONYMS Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DMDBugsTest.java (with props) Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java?view=diff&rev=566359&r1=566358&r2=566359 ============================================================================== --- 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 Wed Aug 15 15:21:32 2007 @@ -1730,43 +1730,44 @@ //then the "if" statement below will use those types values //for ?s. If there are still some ?s in the IN list that are left //with unassigned values, then we will set those ? to NULL. - //eg if getTables is called to only look for table types 'S' and - //'A', then 'S' will be used for first ? in TABLETYPE IN (?, ?, ?, ?) - //'A' will be used for second ? in TABLETYPE IN (?, ?, ?, ?) and - //NULL will be used for third and fourth ?s in + // So paramter 4 will be "T" for TABLE, 5 will be "V" for VIEW, 6 will be + // "A" for SYNONYM, 7 will be "S" for system table in //TABLETYPE IN (?, ?, ?, ?) - //If the user hasn't asked for any specific table types, then the - //"else" statement below will kick in. When the control comes to - //"else" statement, it means that the user wants to see all the - //table types supported by Derby. And hence, we simply set first - //? to 'T', second ? to 'S', third ? to 'V' and fourth ? to 'A'. - //When a new table type is added to Derby in future, we will have - //to do another setString for that in the "else" statement for that - //new table type. - if (types != null && types.length >= 1) { - int i=0; - final int numberOfTableTypesInDerby = 4; - for (; i