diff options
author | Alexander Barkov <bar@mysql.com> | 2010-11-11 13:25:23 +0300 |
---|---|---|
committer | Alexander Barkov <bar@mysql.com> | 2010-11-11 13:25:23 +0300 |
commit | aa668865e271694e9b3ebbfe518cb4d0c2ad0c38 (patch) | |
tree | c6f7021e2960150a80f50095d0a6d53262e74c33 /mysql-test/r/xml.result | |
parent | 9f71cfc0a965b581c1aa1744d3e092f6f1493a49 (diff) | |
download | mariadb-git-aa668865e271694e9b3ebbfe518cb4d0c2ad0c38.tar.gz |
Bug#57257 Replace(ExtractValue(...)) causes MySQL crash
Bug#57820 extractvalue crashes
Problem: ExtractValue and Replace crashed in some cases
due to invalid handling of empty and NULL arguments.
Per file comments:
@mysql-test/r/ctype_ujis.result
@mysql-test/r/xml.result
@mysql-test/t/ctype_ujis.test
@mysql-test/t/xml.test
Adding tests
@sql/item_strfunc.cc
Make sure Item_func_replace::val_str safely handles empty strings.
@sql/item_xmlfunc.cc
set null_value if nodeset_func returned NULL,
which is possible when the second argument is an
unset user variable.
Diffstat (limited to 'mysql-test/r/xml.result')
-rw-r--r-- | mysql-test/r/xml.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result index fad2cab0e57..e6811789679 100644 --- a/mysql-test/r/xml.result +++ b/mysql-test/r/xml.result @@ -1093,4 +1093,17 @@ Warnings: Warning 1525 Incorrect XML value: 'parse error at line 1 pos 23: unexpected END-OF-INPUT' Warning 1525 Incorrect XML value: 'parse error at line 1 pos 23: unexpected END-OF-INPUT' DROP TABLE t1; +# +# Bug#57257 Replace(ExtractValue(...)) causes MySQL crash +# +SET NAMES utf8; +SELECT REPLACE(EXTRACTVALUE('1', '/a'),'ds',''); +REPLACE(EXTRACTVALUE('1', '/a'),'ds','') + +# +# Bug #57820 extractvalue crashes +# +SELECT AVG(DISTINCT EXTRACTVALUE((''),('$@k'))); +AVG(DISTINCT EXTRACTVALUE((''),('$@k'))) +NULL End of 5.1 tests |