Skip to content
Permalink
Browse files
Fix index scan cleanup in the partition engine.
Spiral Patch 057: 057_mariadb-10.2.0.partition_index_end.diff MDEV-12999

Original author: Kentoku SHIBA
First reviewer:  Jacob Mathew
Second reviewer: Michael Widenius
  • Loading branch information
montywi committed Dec 3, 2017
1 parent f26e14e commit 3907ff2
Showing 1 changed file with 10 additions and 8 deletions.
@@ -5410,19 +5410,21 @@ int ha_partition::index_init(uint inx, bool sorted)
int ha_partition::index_end()
{
int error= 0;
uint i;
handler **file;
DBUG_ENTER("ha_partition::index_end");

active_index= MAX_KEY;
m_part_spec.start_part= NO_CURRENT_PART_ID;
for (i= bitmap_get_first_set(&m_part_info->read_partitions);
i < m_tot_parts;
i= bitmap_get_next_set(&m_part_info->read_partitions, i))
file= m_file;
do
{
int tmp;
if ((tmp= m_file[i]->ha_index_end()))
error= tmp;
}
if ((*file)->inited == INDEX)
{
int tmp;
if ((tmp= (*file)->ha_index_end()))
error= tmp;
}
} while (*(++file));
destroy_record_priority_queue();
DBUG_RETURN(error);
}

0 comments on commit 3907ff2

Please sign in to comment.