summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-09-29 17:48:32 +0300
committerMonty <monty@mariadb.org>2017-09-29 17:48:32 +0300
commit7c554e1fae6fb429e5b0b432a05d82f605ed51e8 (patch)
treee552a7ceb8f35955776c80dde3956a35623cc43d
parent04ef45cb5bd69180d90d35cb57a0dab3ab224f60 (diff)
downloadmariadb-git-7c554e1fae6fb429e5b0b432a05d82f605ed51e8.tar.gz
Fix index scan cleanup in the partition engine.10.2-spider-extra10.2-spider
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
-rw-r--r--sql/ha_partition.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 3ce523c63ac..8a187ea41d1 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -5411,19 +5411,21 @@ err:
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);
}