diff options
author | unknown <bar@mysql.com> | 2006-04-17 11:49:20 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2006-04-17 11:49:20 +0500 |
commit | 1a3cb50c24f8af7124823ddd8d85e97632182cb2 (patch) | |
tree | 15ef3a723fc958fb65e19df9d1c279e5b1017f2a /mysql-test/t/xml.test | |
parent | 3ef014862b0a8c374e10c6dd43bd90634bc1ba23 (diff) | |
download | mariadb-git-1a3cb50c24f8af7124823ddd8d85e97632182cb2.tar.gz |
Bug#18170: XML: ExtractValue(): XPath expression can't use QNames (colon in names)
Problem source:
Qualified names (aka QName) didn't work as tag names and attribute names,
because the parser lacked a real rule to scan QName, so it understood
only non-qualified names without prefixes.
Solution:
New rule was added to check both "ident" and "ident:ident" sequences.
mysql-test/r/xml.result:
Adding test case
mysql-test/t/xml.test:
Adding test case
sql/item_xmlfunc.cc:
Adding real QName parser rule and using it in NodeTest rule.
Diffstat (limited to 'mysql-test/t/xml.test')
-rw-r--r-- | mysql-test/t/xml.test | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test index 8ed623883b6..d3e2da46413 100644 --- a/mysql-test/t/xml.test +++ b/mysql-test/t/xml.test @@ -321,3 +321,11 @@ END// DELIMITER ;// CALL p2(); DROP PROCEDURE p2; + +# +# Bug#18170: XML: ExtractValue(): +# XPath expression can't use QNames (colon in names) +# +select extractValue('<ns:element xmlns:ns="myns"/>','count(ns:element)'); +select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element'); +select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns'); |