Commit 7c554e1f authored by Monty's avatar Monty

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
parent 04ef45cb
...@@ -5411,19 +5411,21 @@ int ha_partition::index_init(uint inx, bool sorted) ...@@ -5411,19 +5411,21 @@ int ha_partition::index_init(uint inx, bool sorted)
int ha_partition::index_end() int ha_partition::index_end()
{ {
int error= 0; int error= 0;
uint i; handler **file;
DBUG_ENTER("ha_partition::index_end"); DBUG_ENTER("ha_partition::index_end");
active_index= MAX_KEY; active_index= MAX_KEY;
m_part_spec.start_part= NO_CURRENT_PART_ID; m_part_spec.start_part= NO_CURRENT_PART_ID;
for (i= bitmap_get_first_set(&m_part_info->read_partitions); file= m_file;
i < m_tot_parts; do
i= bitmap_get_next_set(&m_part_info->read_partitions, i))
{ {
int tmp; if ((*file)->inited == INDEX)
if ((tmp= m_file[i]->ha_index_end())) {
error= tmp; int tmp;
} if ((tmp= (*file)->ha_index_end()))
error= tmp;
}
} while (*(++file));
destroy_record_priority_queue(); destroy_record_priority_queue();
DBUG_RETURN(error); 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