summaryrefslogtreecommitdiff
path: root/sql/item_xmlfunc.cc
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2006-05-02 14:10:18 +0500
committerunknown <bar@mysql.com>2006-05-02 14:10:18 +0500
commitd3bb4670a9d4b3dfc125b253383534693dc9fa59 (patch)
tree48454b6ff02bd1344f02f9d4a2d2c1c9217433bd /sql/item_xmlfunc.cc
parentc7a5f503420c56522ccc63fdcac80177e00dabb1 (diff)
parent3010775ed19b6fbbbc2837e5ed8b377266c5533a (diff)
downloadmariadb-git-d3bb4670a9d4b3dfc125b253383534693dc9fa59.tar.gz
Merge mysql.com:/usr/home/bar/mysql-5.1-new
into mysql.com:/usr/home/bar/mysql-5.1-new.b18201 mysql-test/r/xml.result: Auto merged mysql-test/t/xml.test: Auto merged sql/item_xmlfunc.cc: Auto merged
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;