Bug #21116 getDriverVersion information not updated at releases
Submitted: 18 Jul 2006 15:09 Modified: 11 Sep 2007 16:35
Reporter: Domas Mituzas Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:3.1.13, .. OS:Any
Assigned to: CPU Architecture:Any

[18 Jul 2006 15:09] Domas Mituzas
Description:
DatabaseMetaData.getDriverVersion() contains SVN keywords $Date: and $Revision$ which are (or were) not expanded/updated when forming release.

How to repeat:
call DatabaseMetaData.getDriverVersion(), or just look at sources

Suggested fix:
touch the file at every release?
[18 Jul 2006 16:50] Mark Matthews
CVS actually updated these automatically. I guess SVN's not doing it. I'll look into it further.
[7 Dec 2006 21:15] Mark Matthews
Now that I look at it, looks like it's being expanded to me. What's the issue? Can you point to a particular version where this didn't happen?
[8 Jan 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[20 Aug 2007 10:57] Sveta Smirnova
Revision and date for tags 5.0.6 and 5.0.7 are same for me:

apple@apple ~/Documents/web_project/Eclipse/workspace/branch_5_0
$java -classpath /Users/apple/Documents/web_project/Eclipse/workspace/5.0.7/connector-j/build/mysql-connector-java-5.0.7/mysql-connector-java-5.0.7-bin.jar:/Users/apple/Documents/web_project/Eclipse/workspace/5.0.7/connector-j/build/mysql-connector-java-5.0.7/src:$CLASSPATH:/Users/apple/Documents/web_project/MySQL/bugs -Xmx256M -Dcom.mysql.jdbc.testsuite.url="jdbc:mysql://127.0.0.1:3350/test?user=root&password=" bug21116
.Loading JDBC driver 'com.mysql.jdbc.Driver'
Done.

Done.

Connected to 5.0.48-debug
mysql-connector-java-5.0.7 ( $Date: 2007-03-09 21:13:57 +0000 (Fri, 09 Mar 2007) $, $Revision: 6341 $ )

Time: 0.254

OK (1 test)

apple@apple ~/Documents/web_project/Eclipse/workspace/branch_5_0
$java -classpath /Users/apple/Documents/web_project/Eclipse/workspace/5.0.6/connector-j/build/mysql-connector-java-5.0.6/mysql-connector-java-5.0.6-bin.jar:/Users/apple/Documents/web_project/Eclipse/workspace/5.0.6/connector-j/build/mysql-connector-java-5.0.6/src:$CLASSPATH:/Users/apple/Documents/web_project/MySQL/bugs -Xmx256M -Dcom.mysql.jdbc.testsuite.url="jdbc:mysql://127.0.0.1:3350/test?user=root&password=" bug21116
.Loading JDBC driver 'com.mysql.jdbc.Driver'
Done.

Done.

Connected to 5.0.48-debug
mysql-connector-java-5.0.6 ( $Date: 2007-03-09 21:13:57 +0000 (Fri, 09 Mar 2007) $, $Revision: 6341 $ )

Time: 0.273

OK (1 test)

Content of bug21116.java:

import testsuite.BaseTestCase;

import java.sql.DatabaseMetaData;

import com.mysql.jdbc.Driver;

public class bug21116 extends BaseTestCase {
	
	public bug21116(String name) {
		super(name);
	}

	public static void main(String[] args) {
		junit.textui.TestRunner.run(bug21116.class);
	}

	public void testBug29893() throws Exception {
		try {
			System.out.println(this.conn.getMetaData().getDriverVersion());
		} finally {
	    	closeMemberJDBCResources();
		}
	}
	
}

Test is not correct, because is not clear how to better insert revision number and value.
[4 Sep 2007 21:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/33672
[4 Sep 2007 21:41] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/33674
[4 Sep 2007 21:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/33675
[6 Sep 2007 15:14] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/33832
[7 Sep 2007 14:04] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/33909
[11 Sep 2007 16:35] MC Brown
A note has been added to the 5.0.8 and 5.1.3 changelog: 

The automated SVN revisions in DBMD.getDriverVersion(). The SVN revision of the directory is now inserted into the version information during the build.
[3 Oct 2007 16:42] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/34839
[3 Oct 2007 16:46] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/34840
[3 Oct 2007 18:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/34855
[5 Oct 2007 18:53] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/35011
[11 Oct 2007 20:11] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/35407
[11 Oct 2007 20:24] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/35410
[11 Oct 2007 20:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/35414
[19 Nov 2007 0:57] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/38019
[19 Nov 2007 2:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/38024