db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Assigned: (DERBY-1546) Derby JDBC 4.0 driver returns 3 for JDBC driver major version
Date Wed, 26 Jul 2006 07:42:15 GMT
     [ 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

        

Mime
View raw message