summaryrefslogtreecommitdiff
path: root/sql/item_xmlfunc.cc
diff options
context:
space:
mode:
authorbar@bar.intranet.mysql.r18.ru <>2006-06-19 11:18:05 +0500
committerbar@bar.intranet.mysql.r18.ru <>2006-06-19 11:18:05 +0500
commitf3bda9b73fbc8e8b57316af8c4b1ae795b7eec0e (patch)
tree7ed87d0cf61ca81ccf1058864cb7459bbeee6b3a /sql/item_xmlfunc.cc
parentb116411096150ca09e531dab244b5dabe1eff51d (diff)
parentbd3f46ed355687bcaf4335e7f8ed352fad0144dd (diff)
downloadmariadb-git-f3bda9b73fbc8e8b57316af8c4b1ae795b7eec0e.tar.gz
Merge mysql.com:/usr/home/bar/mysql-5.1-new.b18201
into mysql.com:/usr/home/bar/mysql-5.1-kt
Diffstat (limited to 'sql/item_xmlfunc.cc')
-rw-r--r--sql/item_xmlfunc.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc
index 17e8db90dc7..fb5ca083eab 100644
--- a/sql/item_xmlfunc.cc
+++ b/sql/item_xmlfunc.cc
@@ -2601,7 +2601,17 @@ String *Item_xml_str_func::parse_xml(String *raw_xml, String *parsed_xml_buf)
xml_enter(&p, raw_xml->ptr(), 0);
/* Execute XML parser */
- rc= my_xml_parse(&p, raw_xml->ptr(), raw_xml->length());
+ if ((rc= my_xml_parse(&p, raw_xml->ptr(), raw_xml->length())) != MY_XML_OK)
+ {
+ char buf[128];
+ my_snprintf(buf, sizeof(buf)-1, "parse error at line %d pos %d: %s",
+ my_xml_error_lineno(&p) + 1,
+ my_xml_error_pos(&p) + 1,
+ my_xml_error_string(&p));
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_WRONG_VALUE,
+ ER(ER_WRONG_VALUE), "XML", buf);
+ }
my_xml_parser_free(&p);
return rc == MY_XML_OK ? parsed_xml_buf : 0;