[CONJ-84] If a select list contains the same column more than once, the last instance of the column will be returned Created: 2014-03-10 Updated: 2014-09-17 Resolved: 2014-03-13 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | 1.1.5 |
| Fix Version/s: | 1.1.7 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kris Iyer | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Hibernate, JDBC, findColumn | ||
| Environment: |
All. |
||
| Description |
|
As per the JDBC 4.1 spec (15.2.3 Retrieving Values - http://download.oracle.com/otn-pub/jcp/jdbc-4_1-mrel-spec/jdbc4.1-fr-spec.pdf How To Repeat: – Create two tables with the same column name and a relationship between the tables using table1.id=table2.fk CREATE TABLE `table2` ( ALTER TABLE `table2` – Insert three records into table1, two matching records into table2, so there is one set of nulls INSERT INTO `table2` (`id`, `fk`, `attempt`, `description2`) VALUES – Select data with outer join including nulls using wildcard and named columns Results having duplicate columns through left outer join: mysql> SELECT t1.id, t1.attempt, t1.description, t2.* FROM table1 t1 LEFT OUTER JOIN table2 t2 ON t2.fk=t1.id;
---
--- – Finding the column "attempt" PS: The findColumn strategy is used heavily by ORM frameworks like Hibernate for Mapping objects and causes severe failures as a result of this bug. |
| Comments |
| Comment by Kris Iyer [ 2014-03-13 ] |
|
I have been testing a local patch and has worked for me so far. The fixes are available under: |
| Comment by Georg Richter [ 2014-03-13 ] |
|
fixed in rev. 502 |