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/t/xml.test | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mysql-test/t/xml.test') diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test index e69ab5ee58b..ee4f7a94ba2 100644 --- a/mysql-test/t/xml.test +++ b/mysql-test/t/xml.test @@ -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','/'); # --error 1105 select extractvalue('bb!','//b!'); + +# +# Bug #16315 XML: extractvalue() handles self badly +# +select extractvalue('ABC','/a/descendant::*'); +select extractvalue('ABC','/a/self::*'); +select extractvalue('ABC','/a/descendant-or-self::*'); -- cgit v1.2.1