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)
if (arg_count)
{
List<Item> list;
list.empty();
for (uint i=0; i < arg_count; i++)
list.push_back(*(args+i));
for (uint i= 0; i < arg_count; i++)
list.push_back(args[i]);
item_sp= new (thd->mem_root) Item_sum_sp(thd, context, m_name, sp, list);
list.empty();
}
else
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