| Bug #16317 | XML: extractvalue() finds truth in nonexistent places | ||
|---|---|---|---|
| Submitted: | 9 Jan 2006 23:25 | Modified: | 12 Apr 2006 11:45 |
| Reporter: | Peter Gulutzan | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| 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 |
[12 Apr 2006 11:45]
Alexander Barkov
This is rather expected behavior. This online xpath visualization tool thinks the same: http://www.activsoftware.com/xml/xpath/ Closing as not a bug.

Description: With extractvalue(), if a node doesn't exist, then any contains() for that node should fail. But contains() succeeds if the search is for "". How to repeat: mysql> select extractvalue('<a>a b</a>','/a[contains(../Q,"")]'); +----------------------------------------------------+ | extractvalue('<a>a b</a>','/a[contains(../Q,"")]') | +----------------------------------------------------+ | a b | +----------------------------------------------------+ 1 row in set (0.00 sec)