summaryrefslogtreecommitdiff
path: root/sql/item_xmlfunc.cc
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2009-04-01 13:40:33 +0500
committerSergey Glukhov <Sergey.Glukhov@sun.com>2009-04-01 13:40:33 +0500
commitb46dc9ca4d7335192125ccc347a4a70c71b4b012 (patch)
tree5736d1d98769abef33df0d20df1bccf1a0d6811f /sql/item_xmlfunc.cc
parent968069d845dc09c32458ebe593bfadfb8b1ea035 (diff)
downloadmariadb-git-b46dc9ca4d7335192125ccc347a4a70c71b4b012.tar.gz
Bug#43183 ExctractValue() brings result list in missorder
The problem is that XML functions(items) do not reset null_value before their execution and further item excution may use null_value value of the previous result. The fix is to reset null_value. mysql-test/r/xml.result: test result mysql-test/t/xml.test: test case sql/item_xmlfunc.cc: The problem is that XML functions(items) do not reset null_value before their execution and further item excution may use null_value value of the previous result. The fix is to reset null_value.
Diffstat (limited to 'sql/item_xmlfunc.cc')
-rw-r--r--sql/item_xmlfunc.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc
index 5601a2b18c6..6320873e4d3 100644
--- a/sql/item_xmlfunc.cc
+++ b/sql/item_xmlfunc.cc
@@ -2785,6 +2785,7 @@ String *Item_xml_str_func::parse_xml(String *raw_xml, String *parsed_xml_buf)
String *Item_func_xml_extractvalue::val_str(String *str)
{
String *res;
+ null_value= 0;
if (!nodeset_func ||
!(res= args[0]->val_str(str)) ||
!parse_xml(res, &pxml))
@@ -2801,6 +2802,7 @@ String *Item_func_xml_update::val_str(String *str)
{
String *res, *nodeset, *rep;
+ null_value= 0;
if (!nodeset_func ||
!(res= args[0]->val_str(str)) ||
!(rep= args[2]->val_str(&tmp_value3)) ||