[MDEV-22207] Drop default history partitions renders table inaccessible Created: 2020-04-09  Updated: 2020-04-28  Resolved: 2020-04-28

Status: Closed
Project: MariaDB Server
Component/s: Partitioning, Versioned Tables
Affects Version/s: 10.5
Fix Version/s: 10.5.3

Type: Bug Priority: Critical
Reporter: Aleksey Midenkov Assignee: Aleksey Midenkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
Relates
relates to MDEV-22153 ALTER add default history partitions ... Closed

 Description   

Reproduce

--source include/have_partition.inc
--source include/have_innodb.inc
 
create or replace table t1 (i int) with system versioning
partition by system_time limit 1 partitions 5;
 
alter table t1 drop partition p0, p2;
show create table t1;
alter table t1 add partition partitions 1;
show create table t1;
 
drop tables t1;

Result

mysqltest: At line 10: query 'show create table t1' failed: 1017: Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")

Notes

This is continuation of MDEV-22153 bug when contiguity of history partition is broken. ha_partition::open_read_partitions() can not handle non-contiguous list of default partitions.

Fix

When default partition is dropped convert list of partitions to non-default.


Generated at Thu Feb 08 09:13:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.