Select With XmlQuery Returns XMLTYPE Data With CDATA Section Truncated (Doc ID 2208449.1)

Last updated on JANUARY 27, 2017

Applies to:

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

Symptoms

XMLTYPE data can get corrupted

The data returned by an SQL Query(like xmlserialize) is truncated for XMLTYPE data.

The issue happens when CDATA with a relatively large amount of data (more than 4000 bytes long) that contains multi-byte characters and you have to get "unlucky" and have one of these multi-byte characters land right at the end of an internal physical buffer boundary

For example the xml query result for the CDATA will be
e.g. - incorrect result (notice what has happened to the word “CREATE” – C has been cut out)



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