diff options
author | unknown <kostja@bodhi.local> | 2006-08-30 03:00:19 +0400 |
---|---|---|
committer | unknown <kostja@bodhi.local> | 2006-08-30 03:00:19 +0400 |
commit | 5fab3969af3d73abff00cb16c356c106698b97e1 (patch) | |
tree | 844b46ab5d82eec374f925e63be3812e697f87e3 /sql/item_row.cc | |
parent | 2592d4a1399bc1d5a05c8184c19fcddfa661e141 (diff) | |
parent | 4355ea5a38c819cf1e98089b3d85fc628c48da46 (diff) | |
download | mariadb-git-5fab3969af3d73abff00cb16c356c106698b97e1.tar.gz |
Merge bodhi.local:/opt/local/work/mysql-5.0-runtime-safemerge
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
BitKeeper/deleted/.del-im_check_os.inc:
Auto merged
BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
Auto merged
BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
Auto merged
BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
Auto merged
configure.in:
Auto merged
BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
Auto merged
include/mysql_com.h:
Auto merged
mysql-test/lib/mtr_io.pl:
Auto merged
mysql-test/r/im_daemon_life_cycle.result:
Auto merged
mysql-test/r/im_life_cycle.result:
Auto merged
mysql-test/r/im_utils.result:
Auto merged
mysql-test/r/sp-error.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/type_varchar.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
mysql-test/t/im_utils.imtest:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
mysql-test/t/type_varchar.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_row.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/net_serv.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_cache.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_error.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/mysql-test-run.pl:
Use local. Alik will merge his changes manually.
mysql-test/lib/mtr_process.pl:
Use local.
mysql-test/r/grant.result:
Use local.
mysql-test/r/sp.result:
Use local.
mysql-test/r/ps.result:
Manual merge.
mysql-test/t/grant.test:
Manual merge.
mysql-test/t/ps.test:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
sql/Makefile.am:
Manual merge.
sql/field.cc:
Manual merge.
sql/mysqld.cc:
Manual merge.
sql/share/errmsg.txt:
Manual merge.
sql/sp.cc:
Manual merge.
sql/sp_head.h:
Manual merge.
sql/sql_trigger.cc:
Manual merge.
sql/sql_view.cc:
Manual merge.
Diffstat (limited to 'sql/item_row.cc')
-rw-r--r-- | sql/item_row.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/item_row.cc b/sql/item_row.cc index c7b678323a8..6e71ae0d4db 100644 --- a/sql/item_row.cc +++ b/sql/item_row.cc @@ -156,12 +156,22 @@ bool Item_row::walk(Item_processor processor, bool walk_subquery, byte *arg) Item *Item_row::transform(Item_transformer transformer, byte *arg) { + DBUG_ASSERT(!current_thd->is_stmt_prepare()); + for (uint i= 0; i < arg_count; i++) { Item *new_item= items[i]->transform(transformer, arg); if (!new_item) return 0; - items[i]= new_item; + + /* + 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 (items[i] != new_item) + current_thd->change_item_tree(&items[i], new_item); } return (this->*transformer)(arg); } |