summaryrefslogtreecommitdiff
path: root/sql/item_xmlfunc.cc
diff options
context:
space:
mode:
authorunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2007-10-08 16:52:15 +0500
committerunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2007-10-08 16:52:15 +0500
commit736aee97219deae93f87f0fdddf138bbf011508e (patch)
tree39fe2e77698160ab0630df4de4c2210a933cfb5d /sql/item_xmlfunc.cc
parent4374631593eedccdbfb52c9858cf87b4e517f959 (diff)
downloadmariadb-git-736aee97219deae93f87f0fdddf138bbf011508e.tar.gz
Fix for bug #31438: updatexml still crashes
Problem: check missed if the second updatexml() argument is valid. Fix: check it. mysql-test/r/xml.result: Fix for bug #31438: updatexml still crashes - test result. mysql-test/t/xml.test: Fix for bug #31438: updatexml still crashes - test case. sql/item_xmlfunc.cc: Fix for bug #31438: updatexml still crashes - check if the second argument passed to the updatexml() is valid.
Diffstat (limited to 'sql/item_xmlfunc.cc')
-rw-r--r--sql/item_xmlfunc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc
index 15be9c97b6e..1a6c15a4d2e 100644
--- a/sql/item_xmlfunc.cc
+++ b/sql/item_xmlfunc.cc
@@ -2580,7 +2580,8 @@ void Item_xml_str_func::fix_length_and_dec()
return;
}
- xp= args[1]->val_str(&tmp);
+ if (!(xp= args[1]->val_str(&tmp)))
+ return;
my_xpath_init(&xpath);
xpath.cs= collation.collation;
xpath.debug= 0;