summaryrefslogtreecommitdiff
path: root/sql/item_xmlfunc.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2006-03-29 14:27:36 +0300
committermonty@mysql.com <>2006-03-29 14:27:36 +0300
commit1994ed49ecf09b9de26167a850915ef3de2a4ce6 (patch)
tree4d8a2c78f1c611f41d2ea762390198c528239c80 /sql/item_xmlfunc.cc
parent8cb3cf2382e9c8a3afb5d03ec4199e1ac4528bde (diff)
downloadmariadb-git-1994ed49ecf09b9de26167a850915ef3de2a4ce6.tar.gz
Fixed compiler and valgrind warnings
Added missing DBUG_xxx_RETURN statements Fixed some usage of not initialized variables (as found by valgrind) Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called. This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names() This will allow Tomas to continue with his work to use namelocks to syncronize things. Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests
Diffstat (limited to 'sql/item_xmlfunc.cc')
-rw-r--r--sql/item_xmlfunc.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc
index ae626b7c368..91f958d5b70 100644
--- a/sql/item_xmlfunc.cc
+++ b/sql/item_xmlfunc.cc
@@ -2403,8 +2403,7 @@ void Item_xml_str_func::fix_length_and_dec()
char context[32];
uint clen= xpath.query.end - xpath.lasttok.beg;
set_if_bigger(clen, sizeof(context) - 1);
- memcpy(context, xpath.lasttok.beg, clen);
- context[clen]= '\0';
+ strmake(context, xpath.lasttok.beg, clen);
my_printf_error(ER_UNKNOWN_ERROR, "XPATH syntax error: '%s'",
MYF(0), context);
return;