Bug #34723 | Wrong column name reporting | ||
---|---|---|---|
Submitted: | 21 Feb 2008 12:09 | Modified: | 21 Feb 2008 12:22 |
Reporter: | Roberto Marrodán | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 5.1.5 | OS: | Windows |
Assigned to: | CPU Architecture: | Any | |
Tags: | column name originalColumnName |
[21 Feb 2008 12:09]
Roberto Marrodán
[21 Feb 2008 12:22]
Tonci Grgin
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the original bug instead. Thank you for your interest in MySQL. Explanation: Hi Roberto and thanks for your report. This is a duplicate of Bug#32504 and Bug#31499 and many others. Changelog: - Return original column name for RSMD.getColumnName() if the column was aliased, alias name for .getColumnLabel() (if aliased), and original table name for .getTableName(). Note this only works for MySQL-4.1 and newer, as older servers don't make this information available to clients. and docs: useOldAliasMetadataBehavior: Should the driver use the legacy behavior for "AS" clauses on columns and tables, and only return aliases (if any) for Result- SetMetaData.getColumnName() or ResultSet-MetaData.getTableName() rather than the original column/table name? false 5.0.4 Please see Mark's explanation in Bug#31499.