Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 3548 invoked from network); 20 Jul 2006 17:05:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jul 2006 17:05:13 -0000 Received: (qmail 31510 invoked by uid 500); 20 Jul 2006 12:59:32 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 31484 invoked by uid 500); 20 Jul 2006 12:59:32 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 31454 invoked by uid 99); 20 Jul 2006 12:59:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 05:59:32 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 05:59:30 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D001F41000A for ; Thu, 20 Jul 2006 12:57:13 +0000 (GMT) Message-ID: <7919498.1153400233828.JavaMail.jira@brutus> Date: Thu, 20 Jul 2006 05:57:13 -0700 (PDT) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Created: (DERBY-1546) Derby JDBC 4.0 driver returns 3 for JDBC driver major version MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Derby JDBC 4.0 driver returns 3 for JDBC driver major version ------------------------------------------------------------- Key: DERBY-1546 URL: http://issues.apache.org/jira/browse/DERBY-1546 Project: Derby Issue Type: Bug Components: JDBC Affects Versions: 10.2.0.0 Reporter: Kathey Marsden Priority: Minor For 10.2 the DatabaseMetaData.getJDBCMajorVersion() is returning "3" for the Derby JDBC 4.0 driver. It should return 4. This is easily reproduced by running a simple test to obtain a connection and output the value, Database product: Apache Derby Database version: 10.2.0.4 alpha Driver name: Apache Derby Embedded JDBC Driver Driver version: 10.2.0.4 alpha JDBC driver major version: 3 JDBC driver minor version: 0 Test code: org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40 ds = new org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40(); ds.setDatabaseName("C:\\drivers\\derby\\databases\\JDBC40DB"); ds.setUser("dbuser1"); ds.setPassword("dbpwd1"); PooledConnection pooledConn = ds.getPooledConnection(); Connection conn = pooledConn.getConnection(); System.out.println("Database product: " + conn.getMetaData().getDatabaseProductName()); System.out.println("Database version: " + conn.getMetaData().getDatabaseProductVersion()); System.out.println("Driver name: " + conn.getMetaData().getDriverName()); System.out.println("Driver version: " + conn.getMetaData().getDriverVersion()); System.out.println("JDBC driver major version: " + conn.getMetaData().getJDBCMajorVersion()); System.out.println("JDBC driver minor version: " + conn.getMetaData().getJDBCMinorVersion()); Relevant Derby Embedded code in EmbedDatabaseMetaData is: * JDBC 3.0 * * Retrieves the major JDBC version number for this driver. * * @return JDBC version major number */ public int getJDBCMajorVersion() { return 3; } and client code in org.apache.derby.client.am.DatabaseMetaData: public int getJDBCMajorVersion() throws SQLException { checkForClosedConnection(); return 3; } I am not sure if this should be JVM dependent or if it should always return 4 regardless of the JVM version. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira