diff options
author | unknown <bar@mysql.com> | 2006-03-02 14:05:38 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2006-03-02 14:05:38 +0400 |
commit | c76459aca9beae24b3c2d1e9fea7c3a9c386328c (patch) | |
tree | a185767393ca9510ccfdb625027e6474bcababea /sql/item_xmlfunc.cc | |
parent | c32514244897cc000d103f17f883bf8b8c26898e (diff) | |
download | mariadb-git-c76459aca9beae24b3c2d1e9fea7c3a9c386328c.tar.gz |
Bug#16316: XML: extractvalue() is case-sensitive with contains()
xml.result, xml.test:
Adding test case.
item_xmlfunc.cc:
Fixed that Item_nodeset_func derived classes
didn't take into account charset of the XML value
and always worked using "binary" charset.
sql/item_xmlfunc.cc:
Bug#16316: XML: extractvalue() is case-sensitive with contains()
Fixed that Item_nodeset_func derived classes
didn't take into account charset of the XML value
and always worked using "binary" charset.
mysql-test/t/xml.test:
Adding test case.
mysql-test/r/xml.result:
Adding test case.
Diffstat (limited to 'sql/item_xmlfunc.cc')
-rw-r--r-- | sql/item_xmlfunc.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index 26c2e84f8dd..8ad7e2f9661 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -206,7 +206,11 @@ public: return str; } enum Item_result result_type () const { return STRING_RESULT; } - void fix_length_and_dec() { max_length= MAX_BLOB_WIDTH; } + void fix_length_and_dec() + { + max_length= MAX_BLOB_WIDTH; + collation.collation= pxml->charset(); + } const char *func_name() const { return "nodeset"; } }; @@ -2373,6 +2377,7 @@ void Item_xml_str_func::fix_length_and_dec() xpath.cs= collation.collation; xpath.debug= 0; xpath.pxml= &pxml; + pxml.set_charset(collation.collation); rc= my_xpath_parse(&xpath, xp->ptr(), xp->ptr() + xp->length()); |