Commit 9599cbc2 authored by Nikita Malyavin's avatar Nikita Malyavin

online_alter: clean up usage of cleanup_cache_list

parent 50095046
......@@ -182,11 +182,8 @@ int online_alter_log_row(TABLE* table, const uchar *before_record,
}
static void
cleanup_cache_list(ilist<online_alter_cache_data> &list, bool ending_trans)
static void cleanup_cache_list(ilist<online_alter_cache_data> &list)
{
if (ending_trans)
{
auto it= list.begin();
while (it != list.end())
{
......@@ -198,7 +195,6 @@ cleanup_cache_list(ilist<online_alter_cache_data> &list, bool ending_trans)
}
list.clear();
DBUG_ASSERT(list.empty());
}
}
......@@ -258,12 +254,12 @@ int online_alter_end_trans(Online_alter_cache_list &cache_list, THD *thd,
{
my_error(ER_ERROR_ON_WRITE, MYF(ME_ERROR_LOG),
binlog->get_name(), errno);
cleanup_cache_list(cache_list, is_ending_transaction);
DBUG_RETURN(error);
break;
}
}
cleanup_cache_list(cache_list, is_ending_transaction);
if (is_ending_transaction)
cleanup_cache_list(cache_list);
DBUG_RETURN(error);
}
......
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