You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kathey Marsden (JIRA)" <de...@db.apache.org> on 2006/07/20 14:57:13 UTC

[jira] Created: (DERBY-1546) Derby JDBC 4.0 driver returns 3 for JDBC driver major version

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

        

[jira] Commented: (DERBY-1546) Derby JDBC 4.0 driver returns 3 for JDBC driver major version

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1546?page=comments#action_12423667 ] 
            
Rick Hillegas commented on DERBY-1546:
--------------------------------------

Hi Knut Anders. Thanks for the ample explanation of the changes. They look good to me.

> 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
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-1546-v1.diff, derby-1546-v1.stat
>
>
> 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

        

[jira] Commented: (DERBY-1546) Derby JDBC 4.0 driver returns 3 for JDBC driver major version

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1546?page=comments#action_12422464 ] 
            
Rick Hillegas commented on DERBY-1546:
--------------------------------------

This is the correct behavior if you are running on jvm 1.4 or 1.5.

If you are running on 1.6, the major version should be 4. It isn't, so this is a bug.

> 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

        

[jira] Closed: (DERBY-1546) Derby JDBC 4.0 driver returns 3 for JDBC driver major version

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden closed DERBY-1546.
---------------------------------


> Derby JDBC 4.0 driver returns 3 for JDBC driver major version
> -------------------------------------------------------------
>
>                 Key: DERBY-1546
>                 URL: https://issues.apache.org/jira/browse/DERBY-1546
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.2.1.6
>            Reporter: Kathey Marsden
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.2.1.6
>
>         Attachments: derby-1546-v1.diff, derby-1546-v1.stat
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DERBY-1546) Derby JDBC 4.0 driver returns 3 for JDBC driver major version

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1546?page=all ]

Knut Anders Hatlen resolved DERBY-1546.
---------------------------------------

    Fix Version/s: 10.2.0.0
       Resolution: Fixed
       Derby Info:   (was: [Patch Available])

Thank you for looking at the patch, Rick. Committed revision 425987.

> 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
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.2.0.0
>
>         Attachments: derby-1546-v1.diff, derby-1546-v1.stat
>
>
> 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

        

[jira] Updated: (DERBY-1546) Derby JDBC 4.0 driver returns 3 for JDBC driver major version

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1546?page=all ]

Knut Anders Hatlen updated DERBY-1546:
--------------------------------------

    Derby Info: [Patch Available]

> 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
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-1546-v1.diff, derby-1546-v1.stat
>
>
> 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

        

[jira] Assigned: (DERBY-1546) Derby JDBC 4.0 driver returns 3 for JDBC driver major version

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1546?page=all ]

Knut Anders Hatlen reassigned DERBY-1546:
-----------------------------------------

    Assignee: Knut Anders Hatlen

> 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
>         Assigned To: Knut Anders Hatlen
>            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

        

[jira] Updated: (DERBY-1546) Derby JDBC 4.0 driver returns 3 for JDBC driver major version

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1546?page=all ]

Knut Anders Hatlen updated DERBY-1546:
--------------------------------------

    Attachment: derby-1546-v1.diff
                derby-1546-v1.stat

derby-1546-v1.diff makes getJDBCMajorVersion() return 4 when using the
JDBC 4.0 driver and 3 otherwise (the method was not present in JDBC
2.0, so there is no need to return 2 for the 2.0 driver).

Description of the changes:

  * EmbedDatabaseMetaData40 and NetDatabaseMetaData40 override
    getJDBCMajorVersion() and getJDBCMinorVersion().

  * jdbcapi/dbMetaDataJdbc30.java was modified to print "AS EXPECTED"
    instead of the returned value from the JDBC version methods (of
    course, it prints something else if the version is not as
    expected). This was done in order to avoid the need for separate
    jdk16 canons.

  * TestUtil.getJDBCMajorVersion() was updated to recognize JDBC major
    version > 3.

  * Fixed a bug in build.xml in functionTests/util. TestUtil.java is
    incorrectly compiled with source and target level 1.4. It works
    correctly after an 'ant clobber' because some other 1.3 class
    depends on it and causes it to be compiled as part of another ant
    target, but if TestUtil.java is the only file that needs
    recompilation, jdk 1.4 is used.

Derbyall runs cleanly (with the exception of the DERBY-1578 failures)
on Sun JVM 1.5 and 1.6. Reviews would be greatly appreciated! Thanks.

> 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
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-1546-v1.diff, derby-1546-v1.stat
>
>
> 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