Commit 4881c650 authored by Sergei Golubchik's avatar Sergei Golubchik

test case for

MDEV-5689 ExtractValue(xml, 'substring(/x,/y)') crashes
MySQL bug#12428404 MYSQLD.EXE CRASHES WHEN EXTRACTVALUE() IS CALLED WITH MALFORMED XPATH EXP
parent 84651126
...@@ -1161,6 +1161,9 @@ UPDATEXML('<a><c><a>x</a></c></a>','(a)//a','<b />') ...@@ -1161,6 +1161,9 @@ 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'); 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') ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b')
aa bb aa bb
SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)');
ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)')
# #
# End of 5.5 tests # End of 5.5 tests
# #
...@@ -673,6 +673,12 @@ SELECT UPDATEXML('<a><c><a>x</a></c></a>','(a)/a','<b />'); ...@@ -673,6 +673,12 @@ 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 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'); SELECT ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b');
#
# MDEV-5689 ExtractValue(xml, 'substring(/x,/y)') crashes
# MySQL bug#12428404 MYSQLD.EXE CRASHES WHEN EXTRACTVALUE() IS CALLED WITH MALFORMED XPATH EXP
#
SELECT ExtractValue('<a><b>abc</b><c>2</c><d>1</d></a>','substring(/a/b,..)');
--echo # --echo #
--echo # End of 5.5 tests --echo # End of 5.5 tests
--echo # --echo #
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment