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)" <ji...@apache.org> on 2007/05/14 18:35:16 UTC
[jira] Closed: (DERBY-1546) Derby JDBC 4.0 driver returns 3 for
JDBC driver major version
[ 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.