Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 83773 invoked from network); 3 Jun 2009 16:52:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jun 2009 16:52:19 -0000 Received: (qmail 6507 invoked by uid 500); 3 Jun 2009 16:52:31 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 6427 invoked by uid 500); 3 Jun 2009 16:52:31 -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 6209 invoked by uid 99); 3 Jun 2009 16:52:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 16:52:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 16:52:29 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C0B28234C004 for ; Wed, 3 Jun 2009 09:52:08 -0700 (PDT) Message-ID: <1853374120.1244047928774.JavaMail.jira@brutus> Date: Wed, 3 Jun 2009 09:52:08 -0700 (PDT) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Issue Comment Edited: (DERBY-4255) DatabaseMetaData getDatabaseMajorVersion() and getDatabaseMinorVersion() return software version rather than database version In-Reply-To: <254124792.1243974787362.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715961#action_12715961 ] Kathey Marsden edited comment on DERBY-4255 at 6/3/09 9:51 AM: --------------------------------------------------------------- I didn't notice that part but they have separate version methods for driver, database, and database product version. The getDatabaseMajorVersion() javadoc says: Retrieves the major version number of the underlying database. Returns: the underlying database's major version where as getDatabaseProductVersion says: Retrieves the version number of this database product. So there seems to be a differentiation here. was (Author: kmarsden): I didn't notice that part but they have separate version methods for driver and database product version. The getDatabaseMajorVersion() javadoc says: Retrieves the major version number of the underlying database. Returns: the underlying database's major version where as getDatabaseProductVersion says: Retrieves the version number of this database product. So there seems to be a differentiation here. > DatabaseMetaData getDatabaseMajorVersion() and getDatabaseMinorVersion() return software version rather than database version > ----------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-4255 > URL: https://issues.apache.org/jira/browse/DERBY-4255 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.1.3.1, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.1.1, 10.6.0.0 > Reporter: Kathey Marsden > > The javadoc for > DatabaseMetaData.getDatabaseMajorVersion() and getDatabaseMinorVersion() says they should retrieve the version number of the underlying database, so for soft upgraded databases this should be the database format version not the current software version which it currently does. getDatabaseProductVersion should continue to return the current software version. > To reproduce create a database wombat with 10.1 with ij and then run the program below with 10.5. > import java.sql.*; > public class TestDBMetaDatabaseVersion { > public static void main(String[] args) throws Exception{ > Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance(); > Connection conn = DriverManager.getConnection("jdbc:derby:wombat"); > DatabaseMetaData dmd = conn.getMetaData(); > System.out.println("getDatabaseMajorVersion():" + dmd.getDatabaseMajorVersion()); > System.out.println("getDatabaseMinorVersion():" + dmd.getDatabaseMinorVersion()); > System.out.println("getDatabseProductVersion():" + dmd.getDatabaseProductVersion()); > > } > } > The output shows: > getDatabaseMajorVersion():10 > getDatabaseMinorVersion():5 > getDatabseProductVersion():10.5.1.2 - (777744M) > The first two are incorrect and should show 10.1 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.