Icon View Incident Report

Serious Serious
Reported By: Christian Sanggaard
Reported On: 7/21/2016
For: Version 2.24 Build 2
# 4424 Using aParameter in an IFNULL Function in the WHERE Clause Can Cause Incorrect SELECT Query Results

The following is an SQL script from DBISAM that gives me problems after I upgraded to EDB.

The problem is the parameter “VendorCode”.
If I assign a value to this parameter the database return no records.

I think it has something to do with, that the field I’m trying to filter is from the sub table “Items”.

It works if I change the line.

From:
and ifnull(:VendorCode,EntryNo<>null,VendorCode=:VendorCode)
To:
and VendorCode=:VendorCode



Comments Comments
The fact that there weren't any column references in the first portion of the IFNULL function was tripping up the query expression reduction code, so the IFNULL condition was not actually applied to the correct source table.


Resolution Resolution
Fixed Problem on 7/21/2016 in version 2.24 build 3


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