mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02: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:
parent
3ef014862b
commit
1a3cb50c24
3 changed files with 42 additions and 1 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue