Commit 8a3a332b authored by Sergey Vojtovich's avatar Sergey Vojtovich

Cleanup Item_func_sp::fix_fields()

No need to call list.empty(): first one is called by List constructor,
second one doesn't make sense as the object is destroyed immediately
afterwards.
parent a3ccad0f
...@@ -6522,12 +6522,9 @@ Item_func_sp::fix_fields(THD *thd, Item **ref) ...@@ -6522,12 +6522,9 @@ Item_func_sp::fix_fields(THD *thd, Item **ref)
if (arg_count) if (arg_count)
{ {
List<Item> list; List<Item> list;
list.empty(); for (uint i= 0; i < arg_count; i++)
for (uint i=0; i < arg_count; i++) list.push_back(args[i]);
list.push_back(*(args+i));
item_sp= new (thd->mem_root) Item_sum_sp(thd, context, m_name, sp, list); item_sp= new (thd->mem_root) Item_sum_sp(thd, context, m_name, sp, list);
list.empty();
} }
else else
item_sp= new (thd->mem_root) Item_sum_sp(thd, context, m_name, sp); item_sp= new (thd->mem_root) Item_sum_sp(thd, context, m_name, sp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment