From 01b68c51052514681287dd63e8e713742c42cd0c Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 3 May 2011 10:48:24 +0300 Subject: Bug #12375190: UPDATEXML CRASHES ON SIMPLE INPUTS The XPATH implementation was not handling correctly the XPATH production #19 (http://www.w3.org/TR/1999/REC-xpath-19991116/#node-sets), namely PathExpr ::= | FilterExpr '/' RelativeLocationPath | FilterExpr '//' RelativeLocationPath It was lacking context for the RelativeLocationPath and it was just ignoring the second slash instead of treating it as a different axis specifier. Fixed the above two problems and added a test case. --- 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 89c0b8992b1..b36bd2067cc 100644 --- a/mysql-test/t/xml.test +++ b/mysql-test/t/xml.test @@ -664,6 +664,15 @@ SELECT ExtractValue(CONVERT('<\"', BINARY(10)), 1); SET NAMES latin1; SELECT UPDATEXML(CONVERT('' USING swe7), TRUNCATE('',1), 0); +--echo # +--echo # Bug#12375190: UPDATEXML CRASHES ON SIMPLE INPUTS +--echo # +SELECT UPDATEXML('','(a)/a',''); +SELECT UPDATEXML('x','(a)/a',''); +SELECT UPDATEXML('x','(a)/a',''); +SELECT UPDATEXML('x','(a)//a',''); +SELECT ExtractValue('aabb','(a)/a|(a)/b'); + --echo # --echo # End of 5.5 tests --echo # -- cgit v1.2.1