Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#4521 closed defect (fixed)

OGR SQL: incorrect result with more than 2 JOINs and complex expressions

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords: ogr sql
Cc:

Description

SQL requests involving at least 2 JOINs and an expression based on a column (for example a CAST), but not directly the column name, return incorrect results : values are not extracted from the right table. More specifically if we have :

SELECT CAST(coltable2) FROM table1 JOIN table2 ON table1.id = table2.id JOIN table3 ON table1.id = table3.id

And coltable2 is the first column of table2.

We would return the value for the first column of table3.

This issue was originally reported as http://lists.osgeo.org/pipermail/gdal-dev/2012-February/031823.html

Change History (2)

comment:1 by Even Rouault, 12 years ago

Milestone: 1.8.2
Resolution: fixed
Status: newclosed

Fixed in trunk (r23988), 1.9 (r23989) and 1.8 (r23990)

comment:2 by Even Rouault, 11 years ago

Milestone: 1.8.2

Milestone 1.8.2 deleted

Note: See TracTickets for help on using tickets.