Bug #16316 XML: extractvalue() is case-sensitive with contains()
Submitted: 9 Jan 2006 23:23 Modified: 4 Mar 2006 4:04
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: XML functions Severity:S3 (Non-critical)
Version:5.1.5-alpha-debug OS:Linux (SUSE 10.0)
Assigned to: Alexander Barkov CPU Architecture:Any

[9 Jan 2006 23:23] Peter Gulutzan
Description:
With extractvalue(), the contains() function is case sensitive.

It could be argued that that is proper XPath behaviour.
But I'm suggesting that search functions should be as
in search conditions, according to SQL collation.

How to repeat:
mysql> select extractvalue('<a>Jack</a>','/a[contains(../a,"J")]');
+------------------------------------------------------+
| extractvalue('<a>Jack</a>','/a[contains(../a,"J")]') |
+------------------------------------------------------+
| Jack                                                 |
+------------------------------------------------------+
1 row in set (0.00 sec)

mysql> select extractvalue('<a>Jack</a>','/a[contains(../a,"j")]');
+------------------------------------------------------+
| extractvalue('<a>Jack</a>','/a[contains(../a,"j")]') |
+------------------------------------------------------+
|                                                      |
+------------------------------------------------------+
1 row in set (0.00 sec)
[2 Mar 2006 10: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/3379
[3 Mar 2006 11:55] Sergei Glukhov
ok to push
[3 Mar 2006 13:19] Alexander Barkov
Pushed into 5.1.8
[4 Mar 2006 4:04] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented behaviour change in 5.1.8 changelog and ExtractValue() funciton deescription. Closed.