Bug #63700 Equals operator used for string comparison
Submitted: 9 Dec 2011 17:43 Modified: 12 Dec 2011 14:27
Reporter: Samuli Tuomola Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:5.1.18 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[9 Dec 2011 17:43] Samuli Tuomola
Description:
Couple of string comparisons are made using == operator at src/com/mysql/jdbc/DatabaseMetaData.java lines 4133 and 4243 (will attach a diff for clarity)

Also there was one in StatementImpl.java but seems that one has been refactored out at least here (though not sure is it the official trunk):
http://bazaar.launchpad.net/~mark-mysql/connectorj/trunk/view/head:/src/com/mysql/jdbc/Sta...

How to repeat:
n/a

Suggested fix:
To use the equals method
[9 Dec 2011 17:45] Samuli Tuomola
FYI

Attachment: mysql-connj-5.1.18-stringcomp.patch (text/x-patch), 1.70 KiB.

[12 Dec 2011 14:27] Mark Matthews
This was already fixed in the patch to another bug, will be released in 5.1.19. Thank you for the bug report.