summaryrefslogtreecommitdiff
path: root/sql/partition_info.h
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2018-01-26 12:46:14 +0300
committerSergei Golubchik <serg@mariadb.org>2018-02-23 15:33:22 +0100
commitdf0e1817c716a4b2c48d2f83d55f4d2549168843 (patch)
tree7767d619d9d7ab7a3faf5f0aab16dd756f7598b1 /sql/partition_info.h
parent45e1c9bb6d32fb7a2fe2e59845ccc3389223d7c9 (diff)
downloadmariadb-git-df0e1817c716a4b2c48d2f83d55f4d2549168843.tar.gz
Vers SQL: partition rotation by INTERVAL fix
Update partition stats on ha_partition::write_row()
Diffstat (limited to 'sql/partition_info.h')
-rw-r--r--sql/partition_info.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/partition_info.h b/sql/partition_info.h
index 26955682dda..f2d185cdfaf 100644
--- a/sql/partition_info.h
+++ b/sql/partition_info.h
@@ -521,8 +521,9 @@ public:
void vers_update_stats(THD *thd, uint part_id)
{
DBUG_ASSERT(vers_info && vers_info->initialized());
- if (part_id < vers_info->now_part->id)
- vers_update_stats(thd, get_partition(part_id));
+ uint lpart_id= num_subparts ? part_id / num_subparts : part_id;
+ if (lpart_id < vers_info->now_part->id)
+ vers_update_stats(thd, get_partition(lpart_id));
}
bool vers_update_range_constants(THD *thd)
{