Bug #18285 ExtractValue not returning character data within <![CDATA[]]> as expected
Submitted: 16 Mar 2006 17:06 Modified: 17 Apr 2006 17:14
Reporter: Mike Souza Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: XML functions Severity:S3 (Non-critical)
Version:mysql-5.1.7-beta OS:Windows (win32)
Assigned to: Alexander Barkov CPU Architecture:Any

[16 Mar 2006 17:06] Mike Souza
Description:
Based on: http://www.w3.org/TR/xpath#section-Text-Nodes

Shouldn't character data "test" from within "<![CDATA[test]]>" be returned in the following:

mysql> select ExtractValue('<tag1><![CDATA[test]]></tag1>','/tag1/');
+--------------------------------------------------------+
| ExtractValue('<tag1><![CDATA[test]]></tag1>','/tag1/') |
+--------------------------------------------------------+
|                                                        |
+--------------------------------------------------------+
1 row in set (0.00 sec)

How to repeat:
See Description
[20 Mar 2006 18:24] Hartmut Holzgraefe
makes sense, CDATA sections should be transparent ...
[20 Mar 2006 18:25] Hartmut Holzgraefe
test case

Attachment: bug18285.test (application/octet-stream, text), 135 bytes.

[20 Mar 2006 18:27] Hartmut Holzgraefe
expected test result

Attachment: bug18285.result (application/octet-stream, text), 158 bytes.

[20 Mar 2006 18:27] Hartmut Holzgraefe
actual test result

Attachment: bug18285.reject (application/octet-stream, text), 154 bytes.

[7 Apr 2006 6:11] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4590
[12 Apr 2006 8:37] Alexander Barkov
Reviewed by Svoj.
[12 Apr 2006 8:47] Alexander Barkov
Fixed in 5.1.10
[17 Apr 2006 17:14] Mike Hillyer
Documented in 5.1.10 changelog:

    <listitem>
        <para>
          <function>ExtractValue</function> function did not return
          character data within <literal>&lt;![CDATA[]]&gt;</literal> as
expected. (Bug #18285)
        </para>
      </listitem>