diff options
author | unknown <msvensson@shellback.(none)> | 2006-08-31 11:57:36 +0200 |
---|---|---|
committer | unknown <msvensson@shellback.(none)> | 2006-08-31 11:57:36 +0200 |
commit | 085446b8c8de9154be2673efd7c8676ececd83ff (patch) | |
tree | 4dad270a7943d4828944102de9e6d9aa8dc57244 /sql/item_strfunc.cc | |
parent | 066154d2d97417c687c8331d84fa53b61af5a749 (diff) | |
parent | 1a22b9c1f62f2e24a8a8899fac32bd29503ee3e8 (diff) | |
download | mariadb-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.cc | 20 |
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(")); |