db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (DERBY-4255) DatabaseMetaData getDatabaseMajorVersion() and getDatabaseMinorVersion() return software version rather than database version
Date Wed, 03 Jun 2009 16:52:08 GMT

    [ 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.


Mime
View raw message