summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2009-12-22 13:52:23 +0400
committerSergey Glukhov <Sergey.Glukhov@sun.com>2009-12-22 13:52:23 +0400
commitc3114506bb524900bf4c994a3580abfc9c9a56cb (patch)
tree2c15bd50c6282805145b61c4d1e4aaa3826842b4 /sql/item_func.cc
parent27c0939846994db64f109c262c6cc05ff8abcd29 (diff)
downloadmariadb-git-c3114506bb524900bf4c994a3580abfc9c9a56cb.tar.gz
Bug#47371 reference by same column name
At the end of execution top level join execution we cleanup this join with true argument. It leads to underlying join cleanup(subquery) with true argument too and to tmp_table_param->field array cleanup which is required later. The problem is that Item_func_set_user_var does not set result_filed which leads to unnecessary repeated excution of subquery on final stage. The fix is to set result_field for Item_func_set_user_var.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index d6f315fda50..cb0d6bdbe5f 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -610,7 +610,7 @@ void Item_func::signal_divide_by_null()
Item *Item_func::get_tmp_table_item(THD *thd)
{
- if (!with_sum_func && !const_item() && functype() != SUSERVAR_FUNC)
+ if (!with_sum_func && !const_item())
return new Item_field(result_field);
return copy_or_same(thd);
}