SDO_RELATE With Mask=Contains Returns Wrong Results If Where Clause = TRUE (Doc ID 1584489.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Spatial and Graph - Version 11.2.0.3 to 12.1.0.1 [Release 11.2 to 12.1]
Information in this document applies to any platform.

Symptoms

While the SQL statement work correctly on Oracle 11.1.0.7 but, after upgrade to 11.2.0.3 and test the same query it returns no rows.

The SQL statement have sdo_relate('mask=CONTAINS') in the select list and the where clause have a comaprison to value "TRUE" .

SELECT FID
FROM (SELECT F.ID AS FID, SDO_RELATE(T.POLYGON, F.POLYGON, 'mask=CONTAINS')
AS RELATE
FROM GEOMTABLE1 T, GEOMTABLE2 F
WHERE T.ID in (1,2) and f.id=5)
WHERE RELATE='TRUE'

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms