From 1dc87feb20fbfd7cf3fe974f7e39fd6892ebcf85 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 Mar 2006 11:57:37 +0400 Subject: 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. --- mysql-test/t/xml.test | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysql-test/t/xml.test') 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('Jack','/a[contains(../a,"J")]'); select extractvalue('Jack','/a[contains(../a,"j")]'); select extractvalue('Jack','/a[contains(../a,"j")]' collate latin1_bin); select extractvalue('Jack' collate latin1_bin,'/a[contains(../a,"j")]'); + +# +# Bug #18171 XML: ExtractValue: the XPath position() +# function crashes the server! +# +--error 1105 +select extractValue('1','position()'); +--error 1105 +select extractValue('1','last()'); -- cgit v1.2.1