summaryrefslogtreecommitdiff
path: root/mysql-test/t/xml.test
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2006-03-15 11:57:37 +0400
committerunknown <bar@mysql.com>2006-03-15 11:57:37 +0400
commit1dc87feb20fbfd7cf3fe974f7e39fd6892ebcf85 (patch)
tree31850c00ce0901fc06bfbb88199ee196d6ce4d9b /mysql-test/t/xml.test
parent4ac5afa3b991654a38b39ad44880e74da06a02c3 (diff)
downloadmariadb-git-1dc87feb20fbfd7cf3fe974f7e39fd6892ebcf85.tar.gz
xml.result, xml.test:
Adding test. item_xmlfunc.cc: Bug #18171 XML: ExtractValue: the XPath position() function crashes the server! Disallowing use of position() and last() without context. sql/item_xmlfunc.cc: Bug #18171 XML: ExtractValue: the XPath position() function crashes the server! Disallowing use of position() and last() without context. mysql-test/t/xml.test: Adding test. mysql-test/r/xml.result: Adding test.
Diffstat (limited to 'mysql-test/t/xml.test')
-rw-r--r--mysql-test/t/xml.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test
index 831867937e4..ae1c9cf3b6b 100644
--- a/mysql-test/t/xml.test
+++ b/mysql-test/t/xml.test
@@ -277,3 +277,12 @@ select extractvalue('<a>Jack</a>','/a[contains(../a,"J")]');
select extractvalue('<a>Jack</a>','/a[contains(../a,"j")]');
select extractvalue('<a>Jack</a>','/a[contains(../a,"j")]' collate latin1_bin);
select extractvalue('<a>Jack</a>' collate latin1_bin,'/a[contains(../a,"j")]');
+
+#
+# Bug #18171 XML: ExtractValue: the XPath position()
+# function crashes the server!
+#
+--error 1105
+select extractValue('<e>1</e>','position()');
+--error 1105
+select extractValue('<e>1</e>','last()');