summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-10-30 13:02:59 +0100
committerSergei Golubchik <serg@mariadb.org>2018-10-30 15:10:01 +0100
commit44f6f445933e12cbc4cce63e2b7d983b9938d3b9 (patch)
treef5230fb24510bb201eb33122a62939ce74588b83 /sql/ha_partition.cc
parent8772824ce72a811ea92dd5cfb73602eb93237891 (diff)
parentf4b8b6b9a3ad4ce5e5218e2ec2dfe6dd34112e45 (diff)
downloadmariadb-git-44f6f445933e12cbc4cce63e2b7d983b9938d3b9.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 549fbe4cdfb..d0ae8f47007 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -3889,9 +3889,14 @@ THR_LOCK_DATA **ha_partition::store_lock(THD *thd,
}
else
{
- for (i= bitmap_get_first_set(&(m_part_info->lock_partitions));
+ MY_BITMAP *used_partitions= lock_type == TL_UNLOCK ||
+ lock_type == TL_IGNORE ?
+ &m_locked_partitions :
+ &m_part_info->lock_partitions;
+
+ for (i= bitmap_get_first_set(used_partitions);
i < m_tot_parts;
- i= bitmap_get_next_set(&m_part_info->lock_partitions, i))
+ i= bitmap_get_next_set(used_partitions, i))
{
DBUG_PRINT("info", ("store lock %d iteration", i));
to= m_file[i]->store_lock(thd, to, lock_type);