Icon View Incident Report

Serious Serious
Reported By: Igor Colovic
Reported On: 2/21/2012
For: Version 2.07 Build 1
# 3550 CONTAINS Condition with Wildcards Can Return Incorrect Results When Combined with Other Conditions

The problem is with a query that is using TextIndex to search for records and an additional condition.
Additional condition comes from an external function, but it can be any other condition.

If there is no additional condition the there is an TextIndex scan.

But if I add an another condition witch is not an TextIndex CONTAINS the result is 0 rows.

SELECT ALL
"HeadingID" AS "HeadingID",
StatusActive("H"."Status", 8) AS "Expression"
FROM "Headings" AS "H"
WHERE (("Heading" CONTAINS 'zakon*') OR ("Remark" CONTAINS 'zakon*')) AND
(("Heading" CONTAINS 'rad*') OR ("Remark" CONTAINS 'rad*')) AND
((StatusActive("H"."Status", 8)) = TRUE)
ORDER BY CAST("Heading", VARCHAR(20)) COLLATE "SRL_CI"



Comments Comments
Thanks to Terry Swiers for help in reproducing this issue. The problem was caused by how EDB was internally executing CONTAINS conditions that were being treated as un-optimized by the query optimizer for use with other optimized conditions. In such specific cases, EDB does not do an actual index scan, but rather uses a different method of executing the CONTAINS conditions.


Resolution Resolution
Fixed Problem on 2/27/2012 in version 2.08 build 1


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