summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorunknown <msvensson@shellback.(none)>2006-08-31 11:57:36 +0200
committerunknown <msvensson@shellback.(none)>2006-08-31 11:57:36 +0200
commit085446b8c8de9154be2673efd7c8676ececd83ff (patch)
tree4dad270a7943d4828944102de9e6d9aa8dc57244 /sql/item_strfunc.cc
parent066154d2d97417c687c8331d84fa53b61af5a749 (diff)
parent1a22b9c1f62f2e24a8a8899fac32bd29503ee3e8 (diff)
downloadmariadb-git-085446b8c8de9154be2673efd7c8676ececd83ff.tar.gz
Merge shellback.(none):/home/msvensson/mysql/mysql-5.0
into shellback.(none):/home/msvensson/mysql/mysql-5.0-maint configure.in: Auto merged include/mysql.h: Auto merged include/mysql_com.h: Auto merged sql-common/client.c: Auto merged sql/item_strfunc.cc: Auto merged sql/item_strfunc.h: Auto merged sql/sql_acl.cc: Auto merged
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index efd01d701b6..2acd1371ce5 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -2053,6 +2053,26 @@ String *Item_func_make_set::val_str(String *str)
}
+Item *Item_func_make_set::transform(Item_transformer transformer, byte *arg)
+{
+ DBUG_ASSERT(!current_thd->is_stmt_prepare());
+
+ Item *new_item= item->transform(transformer, arg);
+ if (!new_item)
+ return 0;
+
+ /*
+ THD::change_item_tree() should be called only if the tree was
+ really transformed, i.e. when a new item has been created.
+ Otherwise we'll be allocating a lot of unnecessary memory for
+ change records at each execution.
+ */
+ if (item != new_item)
+ current_thd->change_item_tree(&item, new_item);
+ return Item_str_func::transform(transformer, arg);
+}
+
+
void Item_func_make_set::print(String *str)
{
str->append(STRING_WITH_LEN("make_set("));