From 3f480fcb9f726f65925526045e036b16ecc2d8fa Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Mar 2006 13:16:12 +0400 Subject: 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. --- mysql-test/r/xml.result | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/r/xml.result') diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result index 3ed3df546d1..f9b8e9c9dab 100644 --- a/mysql-test/r/xml.result +++ b/mysql-test/r/xml.result @@ -65,6 +65,9 @@ c1 SELECT extractValue(@xml,'/a/child::*'); extractValue(@xml,'/a/child::*') b1 b2 +SELECT extractValue(@xml,'/a/self::*'); +extractValue(@xml,'/a/self::*') +a1 a2 SELECT extractValue(@xml,'/a/descendant::*'); extractValue(@xml,'/a/descendant::*') b1 c1 b2 @@ -546,3 +549,12 @@ select extractvalue('A','/'); ERROR HY000: XPATH syntax error: '>' select extractvalue('bb!','//b!'); ERROR HY000: XPATH syntax error: '!' +select extractvalue('ABC','/a/descendant::*'); +extractvalue('ABC','/a/descendant::*') +B C +select extractvalue('ABC','/a/self::*'); +extractvalue('ABC','/a/self::*') +A +select extractvalue('ABC','/a/descendant-or-self::*'); +extractvalue('ABC','/a/descendant-or-self::*') +A B C -- cgit v1.2.1