summaryrefslogtreecommitdiff
path: root/sql/item_xmlfunc.cc
diff options
context:
space:
mode:
authormonty@mysql.com/nosik.monty.fi <>2007-08-13 16:11:25 +0300
committermonty@mysql.com/nosik.monty.fi <>2007-08-13 16:11:25 +0300
commite53a73e26cf858ac48ead40927d84d54e33c1695 (patch)
treea462885d0de8206ed3a0b18affdd892bafca84c8 /sql/item_xmlfunc.cc
parent113cd2d064e500cd3241046ab374c490d95dace8 (diff)
downloadmariadb-git-e53a73e26cf858ac48ead40927d84d54e33c1695.tar.gz
Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris
Faster thr_alarm() Added 'Opened_files' status variable to track calls to my_open() Don't give warnings when running mysql_install_db Added option --source-install to mysql_install_db I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems index_read() -> index_read_map() index_read_idx() -> index_read_idx_map() index_read_last() -> index_read_last_map()
Diffstat (limited to 'sql/item_xmlfunc.cc')
-rw-r--r--sql/item_xmlfunc.cc20
1 files changed, 13 insertions, 7 deletions
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc
index 067af930d6f..15be9c97b6e 100644
--- a/sql/item_xmlfunc.cc
+++ b/sql/item_xmlfunc.cc
@@ -570,13 +570,13 @@ String *Item_nodeset_func_rootelement::val_nodeset(String *nodeset)
String * Item_nodeset_func_union::val_nodeset(String *nodeset)
{
- uint numnodes= pxml->length() / sizeof(MY_XML_NODE);
+ uint num_nodes= pxml->length() / sizeof(MY_XML_NODE);
String set0, *s0= args[0]->val_nodeset(&set0);
String set1, *s1= args[1]->val_nodeset(&set1);
String both_str;
- both_str.alloc(numnodes);
+ both_str.alloc(num_nodes);
char *both= (char*) both_str.ptr();
- bzero((void*)both, numnodes);
+ bzero((void*)both, num_nodes);
MY_XPATH_FLT *flt;
fltbeg= (MY_XPATH_FLT*) s0->ptr();
@@ -590,7 +590,7 @@ String * Item_nodeset_func_union::val_nodeset(String *nodeset)
both[flt->num]= 1;
nodeset->length(0);
- for (uint i= 0, pos= 0; i < numnodes; i++)
+ for (uint i= 0, pos= 0; i < num_nodes; i++)
{
if (both[i])
((XPathFilter*)nodeset)->append_element(i, pos++);
@@ -2656,7 +2656,9 @@ static uint xml_parent_tag(MY_XML_NODE *items, uint nitems, uint level)
RETURN
Currently only MY_XML_OK
*/
-static int xml_enter(MY_XML_PARSER *st,const char *attr, size_t len)
+extern "C" int xml_enter(MY_XML_PARSER *st,const char *attr, size_t len);
+
+int xml_enter(MY_XML_PARSER *st,const char *attr, size_t len)
{
MY_XML_USER_DATA *data= (MY_XML_USER_DATA*)st->user_data;
MY_XML_NODE *nodes= (MY_XML_NODE*) data->pxml->ptr();
@@ -2687,7 +2689,9 @@ static int xml_enter(MY_XML_PARSER *st,const char *attr, size_t len)
RETURN
Currently only MY_XML_OK
*/
-static int xml_value(MY_XML_PARSER *st,const char *attr, size_t len)
+extern "C" int xml_value(MY_XML_PARSER *st,const char *attr, size_t len);
+
+int xml_value(MY_XML_PARSER *st,const char *attr, size_t len)
{
MY_XML_USER_DATA *data= (MY_XML_USER_DATA*)st->user_data;
MY_XML_NODE *nodes= (MY_XML_NODE*) data->pxml->ptr();
@@ -2717,7 +2721,9 @@ static int xml_value(MY_XML_PARSER *st,const char *attr, size_t len)
RETURN
Currently only MY_XML_OK
*/
-static int xml_leave(MY_XML_PARSER *st,const char *attr, size_t len)
+extern "C" int xml_leave(MY_XML_PARSER *st,const char *attr, size_t len);
+
+int xml_leave(MY_XML_PARSER *st,const char *attr, size_t len)
{
MY_XML_USER_DATA *data= (MY_XML_USER_DATA*)st->user_data;
DBUG_ASSERT(data->level > 0);