Bug #50538 DatabaseMetaData.getDriverVersion() contains unexpanded ${bzr.revision-id}
Submitted: 22 Jan 2010 9:36 Modified: 8 Aug 2013 0:36
Reporter: Ville Skyttä Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:5.1.16, 5.1.17 OS:Any
Assigned to: Alexander Soklakov CPU Architecture:Any

[22 Jan 2010 9:36] Ville Skyttä
Description:
DatabaseMetaData.getDriverVersion() for Connector/J returns:

mysql-connector-java-5.1.11 ( Revision: ${svn.Revision} )

Cosmetic, but ${svn.Revision} is probably intended to be an actual SCM revision number.  It has been like this in several earlier Connector/J releases as well.

How to repeat:
Call DatabaseMetaData.getDriverVersion()
[27 Jan 2010 13:52] Tonci Grgin
Hi Ville and thanks for your report.

Verified as described:
Connected to 5.1.31-log
java.vm.version         : 1.5.0_17-b04
java.vm.vendor          : Sun Microsystems Inc.
java.runtime.version    : 1.5.0_17-b04
os.name                 : Windows Server 2008
os.version              : null
sun.management.compiler : HotSpot Client Compiler

getDriverVerision       :mysql-connector-java-5.1.11 ( Revision: ${svn.Revision} )
getDriverMajorVerision  :5
getDriverMinorVerision  :1
getDriverName           :MySQL-AB JDBC Driver

Besides "( Revision: ${svn.Revision} )" we should change "MySQL-AB JDBC Driver" too.
[3 Feb 2010 20:32] Mark Matthews
Fixed for 5.1.12.
[4 Feb 2010 16:32] Tony Bedford
An entry has been added to the 5.1.12 changelog:

A call to DatabaseMetaData.getDriverVersion() returned the revision as mysql-connector-java-5.1.11 ( Revision: ${svn.Revision} ). The variable ${svn.Revision} was not replaced by the SVN revision number.
[10 Mar 2010 19:58] Ville Skyttä
Reopening - with 5.1.12 the string has changed, but now it contains unexpanded "${bzr.revision-id}":

mysql-connector-java-5.1.12 ( Revision: ${bzr.revision-id} )
[30 Jul 2010 21:32] Todd Farmer
Fixed in subsequent version, unable to duplicate with current source tree.
[13 May 2011 18:25] Clemens Fuchslocher
The current driver version still contains the placeholder instead of the actual revision ID:

mysql-connector-java-5.1.16 ( Revision: ${bzr.revision-id} )
[14 May 2011 8:27] Ville Skyttä
Indeed, reopening.
[26 Jul 2011 17:45] Sveta Smirnova
Verified again with test case from bug #21116:

$java -classpath "/Users/apple/Applications/java/mysql-connector-java-5.1.17/mysql-connector-java-5.1.17-bin.jar:/Users/apple/Applications/java/mysql-connector-java-5.1.17/src:/Users/apple/Applications/java/junit4.3/junit-4.3.jar:$CLASSPATH:/Users/apple/Documents/web_project/MySQL/bugs" -Xmx256M -Dcom.mysql.jdbc.testsuite.url="jdbc:mysql://127.0.0.1:3351/test?user=root&password=" bug50538
.Loading JDBC driver 'com.mysql.jdbc.Driver'
Done.

Done.

Connected to 5.1.59-debug
mysql-connector-java-5.1.17 ( Revision: ${bzr.revision-id} )

Time: 0,325

OK (1 test)
[8 Aug 2013 0:36] Daniel So
Added the following changelog entry for Connector/J 5.1.27:

The string returned by DatabaseMetaData.getDriverVersion() contains the unexpanded expression “${svn.Revision}” or “${bzr.revision-id}” instead of the actual revision number of Connector/J.