mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -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('<a><a>x</a></a>','(a)/a','<b />');
|
||||
SELECT UPDATEXML('<a><c><a>x</a></c></a>','(a)/a','<b />');
|
||||
SELECT UPDATEXML('<a><c><a>x</a></c></a>','(a)//a','<b />');
|
||||
SELECT ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b');
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user