summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2022-05-30 13:04:14 +0300
committerMonty <monty@mariadb.org>2022-05-30 17:26:48 +0300
commit131c318b165cfee1af4494c5581dd57990fe1a5d (patch)
tree02675fa6235343610fb05a4b27a645a5dc7d3375
parent863c3eda872b19f70ce6045119bf621584e1312d (diff)
downloadmariadb-git-131c318b165cfee1af4494c5581dd57990fe1a5d.tar.gz
Remove compiler warning about unused variables
-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 fb55091f05e..cf2536f3969 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -900,10 +900,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);