mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
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.
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user