Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 10.5
-
Fix Version/s: 10.5.3
-
Component/s: Data Definition - Alter Table, Partitioning, Versioned Tables
-
Labels:None
Description
Reproduce
--source include/have_partition.inc
|
--source include/have_innodb.inc
|
|
set default_storage_engine=innodb;
|
create or replace table t1 (x int) with system versioning partition by system_time;
|
alter table t1 add partition partitions 1;
|
alter table t1 add partition partitions 1;
|
alter table t1 add partition partitions 1;
|
show create table t1;
|
|
drop tables t1;
|
Result
mysqltest: At line 8: query 'alter table t1 add partition partitions 1' failed: 1932: Table 'test.t1' doesn't exist in engine
|
Notes
ADD default history partitions generates wrong partition name,
f.ex. p2 instead of p1. Gap in sequence of partition names leads to
ha_partition::open_read_partitions() fail on inexistent name.
Manual fixing such broken table requires:
1. create empty table by any name (t_new) with correct number of partitions;
2. stop the server;
3. rename data files (.myd, .myi or .ibd) of broken table to t_new fixing the partition sequence (#p2 to #p1, #p3 to #p2);
4. start the server;
5. drop the broken table;
6. rename t_new to correct table name.
Attachments
Issue Links
- blocks
-
MDEV-25347 DML events for auto-partitioned tables are written into binary log twice
-
- Closed
-
- is caused by
-
MDEV-19903 Setup default partitions for system versioning
-
- Closed
-
- relates to
-
MDEV-22155 ALTER add default history partitions name clash on non-default partitions
-
- Closed
-
-
MDEV-22207 Drop default history partitions renders table inaccessible
-
- Closed
-