summaryrefslogtreecommitdiff
path: root/mysql-test/r/xml.result
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2007-05-23 12:34:47 +0500
committerunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2007-05-23 12:34:47 +0500
commit1da8ea2ee06f67b3e498520fe22900c748b31dcf (patch)
tree5b7b2e8723f789a9bd16272d476bdde8187337bf /mysql-test/r/xml.result
parentb626d5d78e512b349673cdaebe6eb099d99c925d (diff)
downloadmariadb-git-1da8ea2ee06f67b3e498520fe22900c748b31dcf.tar.gz
Bug#28558 UpdateXML called with garbage crashes server
Problem: Memory overrun happened in attempts to generate error messages (e.g. in case of incorrect XPath syntax). Reason: set_if_bigger() was used instead of set_if_smaller(). Change: replacing wrong set_if_bigger() to set_if_smaller(), and making minor additional code clean-ups. mysql-test/r/xml.result: Adding test cases for all pieces of code with set_if_smaller() followed by my_printf_error(). mysql-test/t/xml.test: Adding test cases for all pieces of code with set_if_smaller() followed by my_printf_error(). sql/item_xmlfunc.cc: - fixing incorrect set_if_bigger to set_if_smaller in two places - getting read of unnesessary "char context[32]" variable and using '%.*s' instead if '%s' in the error format.
Diffstat (limited to 'mysql-test/r/xml.result')
-rw-r--r--mysql-test/r/xml.result6
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result
index 77764e1bc1a..f71b8cadabb 100644
--- a/mysql-test/r/xml.result
+++ b/mysql-test/r/xml.result
@@ -1006,3 +1006,9 @@ Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'string '
Warning 1292 Truncated incorrect INTEGER value: 'string '
DROP PROCEDURE spxml;
+select UpdateXML('<a>a</a>',repeat('a b ',1000),'');
+ERROR HY000: XPATH syntax error: 'b a b a b a b a b a b a b a b a '
+select ExtractValue('<a>a</a>', '/a[@x=@y0123456789_0123456789_0123456789_0123456789]');
+ERROR HY000: XPATH error: comparison of two nodesets is not supported: '=@y0123456789_0123456789_0123456'
+select ExtractValue('<a>a</a>', '/a[@x=$y0123456789_0123456789_0123456789_0123456789]');
+ERROR HY000: Unknown XPATH variable at: '$y0123456789_0123456789_01234567'