Bug #39061 | Incorrect Results Using Connector/J Version 5.1.6 | ||
---|---|---|---|
Submitted: | 27 Aug 2008 2:45 | Modified: | 27 Aug 2008 2:50 |
Reporter: | Glyn Thomas | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.1.6 | OS: | Windows (Vista) |
Assigned to: | CPU Architecture: | Any | |
Tags: | join, tomcat, vista |
[27 Aug 2008 2:45]
Glyn Thomas
[27 Aug 2008 2:50]
Mark Matthews
Version 5.1 changed the behavior of ResultSet.getFoo(String columnLabel) to match that of the JDBC-4.0 specification, which was changed because of an actual bug in the specification. The string passed to getters on ResultSet is the column label (if it exists). Your code asks for the column name. Version 5.1.7 (yet to be released, but available as a nightly snapshot build from http://downloads.mysql.com/snapshots.php) has a configuration option that reverts this behavior (useColumnNamesInFindColumn=true), but in general it's better to update your application if possible to use the new, as specified in JDBC-4.0 behavior.