diff options
author | unknown <bar@mysql.com> | 2006-03-01 13:16:12 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2006-03-01 13:16:12 +0400 |
commit | 3f480fcb9f726f65925526045e036b16ecc2d8fa (patch) | |
tree | cf0ebef280a9b8482ee2914315f405ed0f8df4db /mysql-test/t/xml.test | |
parent | 7f7c624656840767e601b9f156cfeae109ca5b37 (diff) | |
download | mariadb-git-3f480fcb9f726f65925526045e036b16ecc2d8fa.tar.gz |
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.
Diffstat (limited to 'mysql-test/t/xml.test')
-rw-r--r-- | mysql-test/t/xml.test | 8 |
1 files changed, 8 insertions, 0 deletions
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>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::*'); |