summaryrefslogtreecommitdiff
path: root/sql/partition_info.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-06-06 14:56:20 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-06-06 14:56:20 +0300
commit7e39470e337aeeab4ee3e73336c2fff88609529f (patch)
treea2bb0598aeb3e78efcc0cfc2509a22f951ee5447 /sql/partition_info.cc
parent477776bfed892f3f7cadcef16e860a1232f59952 (diff)
parent4179f93d28035ea2798cb1c16feeaaef87ab4775 (diff)
downloadmariadb-git-7e39470e337aeeab4ee3e73336c2fff88609529f.tar.gz
Merge 10.6 into 10.7
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r--sql/partition_info.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 6f3f6ec211a..3d0669e249a 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -887,10 +887,12 @@ void partition_info::vers_check_limit(THD *thd)
bitmap_set_all(), but this is not optimal since there can be quite a number
of partitions.
*/
+#ifndef DBUG_OFF
const uint32 sub_factor= num_subparts ? num_subparts : 1;
uint32 part_id= vers_info->hist_part->id * sub_factor;
const uint32 part_id_end= part_id + sub_factor;
DBUG_ASSERT(part_id_end <= num_parts * sub_factor);
+#endif
ha_partition *hp= (ha_partition*)(table->file);
ha_rows hist_rows= hp->part_records(vers_info->hist_part);