summaryrefslogtreecommitdiff
path: root/sql/item_xmlfunc.cc
diff options
context:
space:
mode:
authorbar@mysql.com <>2006-05-02 14:10:18 +0500
committerbar@mysql.com <>2006-05-02 14:10:18 +0500
commitbd3f46ed355687bcaf4335e7f8ed352fad0144dd (patch)
tree48454b6ff02bd1344f02f9d4a2d2c1c9217433bd /sql/item_xmlfunc.cc
parent92a8da8b188e1cf363d89889471a6998b14d6aea (diff)
parent8fb685c254fb7eac0a87d79132a2a72415d86397 (diff)
downloadmariadb-git-bd3f46ed355687bcaf4335e7f8ed352fad0144dd.tar.gz
Merge mysql.com:/usr/home/bar/mysql-5.1-new
into mysql.com:/usr/home/bar/mysql-5.1-new.b18201
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 a245e3b1b33..e17bb4b750a 100644
--- a/sql/item_xmlfunc.cc
+++ b/sql/item_xmlfunc.cc
@@ -2577,7 +2577,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;