Bug #41043 | SELECT colname AS alias broken | ||
---|---|---|---|
Submitted: | 26 Nov 2008 8:20 | Modified: | 26 Mar 2013 12:19 |
Reporter: | Ross Johnson | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / J | Severity: | S1 (Critical) |
Version: | 5.1.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[26 Nov 2008 8:20]
Ross Johnson
[26 Nov 2008 8:58]
Ross Johnson
As I was copy+pasting from the OOo Base query result table as seen in the second screen dump PNG (Incorrect result) to OOo Calc to generate CSV files to attach here I noticed that the results as seen in Calc are correct (for version MySQL Connector/J 5.1.7, i.e. the same as for version 5.0.8), so I've attached that CSV file for reference. Although I'm changing only the connector jar to generate these results I guess this could as easily be a bug in OOo, triggered by a change of some kind within MySQL Connector/J 5.1.7. Apologies if that''s the case. The incorrect result as shown in the attachment appears both in OOo Base results tables and in the OOo Calc data source pane, but not when either of these are dragged and dropped as a complete table into a Calc sheet.
[3 Dec 2008 7:26]
Tonci Grgin
Hi Ross and thanks for your report. Since I do not know which options you used in connection string I assume your report is a duplicate of following (take your pick): Bug#35150 Inconsistency in column name causes Hibernate to fail. Bug#31499 Alias lost when selecting from LEFT JOIN involving Derived Table Bug#35610 Retrieving values by column label doesn't work Bug#35753 jdbc useOldAliasMetadataBehavior connection property not set Bug#36841 java.sql.SQLException: Invalid column name and many more. Fix for Bug#35753 is not yet released but you can get it from http://svn.mysql.com/svnpublic/connector-j/branches/branch_5_1/ or from http://downloads.mysql.com/snapshots/mysql-connector-java-5.1/mysql-connector-java-5.1-nig.... Bottom line s in 5.1.6 Changelog (fixed): The JDBC driver uses a different method for evaluating column names in resultsetmetadata.getColumnName() and when looking for a column in resultset.getObject(columnName). This caused Hibernate to fail in queries where the two methods yield different results, for example in queries that use alias names: SELECT column AS aliasName from table
[4 Jan 2009 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".
[26 Mar 2013 12:19]
Alexander Soklakov
Hi Ross, Version reported is too old and there is no new feedback since Dec 2008, so I close this report as "Can't repeat". Feel free to reopen it if you have the same problem with latest c/j.