Icon View Incident Report

Serious Serious
Reported By: Accowin [LBRP]
Reported On: 10/23/2014
For: Version 2.18 Build 1
# 4110 JOINs Containing Row Value Constructors with Parameters Can Cause Incorrect Results

When we run a query with parameters we get a different result then when we change the parameters in the sql with the values.

When running query:

SELECT *
FROM AlgRek r INNER JOIN History h ON h.AlgRek=r.Referte INNER JOIN AlgTot t ON (t.Referte,t.jaar,t.Periode)=(r.Referte,:pJaar2,9999)
WHERE (h.Jaar=:pJaar2 AND h.Periode>=:pBegin  AND h.Periode<=:pEinde) and r.Referte IN (SELECT referte FROM AlgRek WHERE prive <> 0)

With param values pJaar2=2013, pBegin=0, pEinde=4 we get 2 records.

If we run the same query but change in the SQL the first pJaar2 by 2013 then we get 6 rows.
The last result is the correct one.



Comments Comments and Workarounds
The workaround is to use multiple = comparison conditions joined by AND operators instead of row value constructors.


Resolution Resolution
Fixed Problem on 11/10/2014 in version 2.18 build 2


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image