Unexpected Row Returned in 11.2.0.3 by EXTRACTVALUE When NONE is Expected (Doc ID 1563298.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.3 and later
Information in this document applies to any platform.

Symptoms

The following query with extractvalue  returns a weird result in 11.2.0.3 when it would be
not expected to get any result at all.

The query is:

select 'QUERY0 : expected ''No rows returned'' ',
     extractvalue(value (xml_data), '/Telephone') Telephone
from
TABLE (xmlsequence (extract (XMLTYPE(q''<MMIT_Data_Record>
<Communication>
      <Telephone Is_Active="false"/>
</Communication>
</MMIT_Data_Record>
     '')
     , '//Communication/Telephone' ))) xml_data
WHERE  extractvalue(value (xml_data),'/Telephone') is not NULL;


QUERY0:EXPECTED''NOROWSRETURNED'' TELEPHONE
------------------------------------ ---------
QUERY0 : expected 'No rows returned'

 

In 11.2.0.1 and 11.2.0.2 the result is correct and as expected it is :

no rows selected

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