summaryrefslogtreecommitdiff
path: root/sql/item_xmlfunc.h
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-08-11 11:18:38 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-08-21 10:40:39 +0400
commit31e365efae28ba3208e80511c4d18fe11a79541a (patch)
treef249682cc42490fc86382f5244a051001dc13c9e /sql/item_xmlfunc.h
parent4374da63f03abc472f68f42e4e93261a18bfe417 (diff)
downloadmariadb-git-31e365efae28ba3208e80511c4d18fe11a79541a.tar.gz
MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)
Added mandatory thd parameter to Item (and all derivative classes) constructor. Added thd parameter to all routines that may create items. Also removed "current_thd" from Item::Item. This reduced number of pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
Diffstat (limited to 'sql/item_xmlfunc.h')
-rw-r--r--sql/item_xmlfunc.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/item_xmlfunc.h b/sql/item_xmlfunc.h
index 5b699869b2e..3758025fc90 100644
--- a/sql/item_xmlfunc.h
+++ b/sql/item_xmlfunc.h
@@ -76,13 +76,12 @@ protected:
return xml_arg->parse(args[0], cache);
}
public:
- Item_xml_str_func(Item *a, Item *b):
- Item_str_func(a,b)
+ Item_xml_str_func(THD *thd, Item *a, Item *b): Item_str_func(thd, a, b)
{
maybe_null= TRUE;
}
- Item_xml_str_func(Item *a, Item *b, Item *c):
- Item_str_func(a,b,c)
+ Item_xml_str_func(THD *thd, Item *a, Item *b, Item *c):
+ Item_str_func(thd, a, b, c)
{
maybe_null= TRUE;
}
@@ -102,7 +101,8 @@ public:
class Item_func_xml_extractvalue: public Item_xml_str_func
{
public:
- Item_func_xml_extractvalue(Item *a,Item *b) :Item_xml_str_func(a,b) {}
+ Item_func_xml_extractvalue(THD *thd, Item *a, Item *b):
+ Item_xml_str_func(thd, a, b) {}
const char *func_name() const { return "extractvalue"; }
String *val_str(String *);
};
@@ -115,7 +115,8 @@ class Item_func_xml_update: public Item_xml_str_func
const MY_XML_NODE *cut,
const String *replace);
public:
- Item_func_xml_update(Item *a,Item *b,Item *c) :Item_xml_str_func(a,b,c) {}
+ Item_func_xml_update(THD *thd, Item *a, Item *b, Item *c):
+ Item_xml_str_func(thd, a, b, c) {}
const char *func_name() const { return "updatexml"; }
String *val_str(String *);
};