mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Bug#16315 XML: extractvalue() handles self badly
xml.result, xml.test: Adding test case. item_xmlfunc.cc: Adding a special function to handle "self" axis. Previously "child" and "self" were handled the same. sql/item_xmlfunc.cc: Bug#16315 XML: extractvalue() handles self badly Adding a special function to handle "self" axis. Previously "child" and "self" were handled the same. mysql-test/t/xml.test: Adding test case. mysql-test/r/xml.result: Adding test case.
This commit is contained in:
parent
7f7c624656
commit
3f480fcb9f
3 changed files with 49 additions and 0 deletions
|
|
@ -23,6 +23,7 @@ SELECT extractValue(@xml,'/*/*');
|
|||
SELECT extractValue(@xml,'/*/*/*');
|
||||
|
||||
SELECT extractValue(@xml,'/a/child::*');
|
||||
SELECT extractValue(@xml,'/a/self::*');
|
||||
SELECT extractValue(@xml,'/a/descendant::*');
|
||||
SELECT extractValue(@xml,'/a/descendant-or-self::*');
|
||||
SELECT extractValue(@xml,'/a/attribute::*');
|
||||
|
|
@ -243,3 +244,10 @@ select extractvalue('<a>A</a>','/<a>');
|
|||
#
|
||||
--error 1105
|
||||
select extractvalue('<a><b>b</b><b!>b!</b!></a>','//b!');
|
||||
|
||||
#
|
||||
# Bug #16315 XML: extractvalue() handles self badly
|
||||
#
|
||||
select extractvalue('<a>A<b>B<c>C</c></b></a>','/a/descendant::*');
|
||||
select extractvalue('<a>A<b>B<c>C</c></b></a>','/a/self::*');
|
||||
select extractvalue('<a>A<b>B<c>C</c></b></a>','/a/descendant-or-self::*');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue