diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2011-05-03 10:48:24 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2011-05-03 10:48:24 +0300 |
commit | 01b68c51052514681287dd63e8e713742c42cd0c (patch) | |
tree | daf416307940106fbee129775b57aa569d64557a /mysql-test/r/xml.result | |
parent | ae154449f1617585e8c6237331fa8a3db4e674bb (diff) | |
download | mariadb-git-01b68c51052514681287dd63e8e713742c42cd0c.tar.gz |
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.
Diffstat (limited to 'mysql-test/r/xml.result')
-rw-r--r-- | mysql-test/r/xml.result | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result index 8ca9ab84bf7..30aa77ddf37 100644 --- a/mysql-test/r/xml.result +++ b/mysql-test/r/xml.result @@ -1144,5 +1144,23 @@ SELECT UPDATEXML(CONVERT('' USING swe7), TRUNCATE('',1), 0); UPDATEXML(CONVERT('' USING swe7), TRUNCATE('',1), 0) NULL # +# Bug#12375190: UPDATEXML CRASHES ON SIMPLE INPUTS +# +SELECT UPDATEXML('','(a)/a',''); +UPDATEXML('','(a)/a','') + +SELECT UPDATEXML('<a><a>x</a></a>','(a)/a','<b />'); +UPDATEXML('<a><a>x</a></a>','(a)/a','<b />') +<a><b /></a> +SELECT UPDATEXML('<a><c><a>x</a></c></a>','(a)/a','<b />'); +UPDATEXML('<a><c><a>x</a></c></a>','(a)/a','<b />') +<a><c><a>x</a></c></a> +SELECT UPDATEXML('<a><c><a>x</a></c></a>','(a)//a','<b />'); +UPDATEXML('<a><c><a>x</a></c></a>','(a)//a','<b />') +<a><c><b /></c></a> +SELECT ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b'); +ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b') +aa bb +# # End of 5.5 tests # |