summaryrefslogtreecommitdiff
path: root/sql/item_xmlfunc.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2018-01-30 11:07:35 +0400
committerAlexander Barkov <bar@mariadb.org>2018-01-30 11:07:35 +0400
commitdae4fb0acb373e653f826f0ec7bdaf2485ef0b93 (patch)
treeea66ce3c195373f913f45d76286f1c5e4123cfdb /sql/item_xmlfunc.h
parentb76881a23cff7aeef1126560410613d9d7bbbb7d (diff)
downloadmariadb-git-dae4fb0acb373e653f826f0ec7bdaf2485ef0b93.tar.gz
MDEV-15118 ExtractValue(xml,something_complex) does not work
Item_xml_str_func::fix_fields() used a local "String tmp" as a buffer for args[1]->val_str(). "tmp" was freed at the end of fix_fields(), while Items created during my_xpath_parse() still pointed to its fragments. Adding a new member Item_xml_str_func::m_xpath_query and store the result of args[1]->val_str() into it.
Diffstat (limited to 'sql/item_xmlfunc.h')
-rw-r--r--sql/item_xmlfunc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_xmlfunc.h b/sql/item_xmlfunc.h
index 637f505e12e..e0356d367bd 100644
--- a/sql/item_xmlfunc.h
+++ b/sql/item_xmlfunc.h
@@ -67,6 +67,7 @@ protected:
return parse(res, cache);
}
};
+ String m_xpath_query; // XPath query text
Item *nodeset_func;
XML xml;
bool get_xml(XML *xml, bool cache= false)