Commit ea5d2043 authored by Mikael Ronstrom's avatar Mikael Ronstrom

Fix to ensure that all subpartitions gets deleted before renaming starts, BUG#47029

parent 80d872bd
drop table if exists t1;
create table t1 (a int not null,
b datetime not null,
primary key (a,b))
engine=innodb
partition by range (to_days(b))
subpartition by hash (a)
subpartitions 2
( partition p0 values less than (to_days('2009-01-01')),
partition p1 values less than (to_days('2009-02-01')),
partition p2 values less than (to_days('2009-03-01')),
partition p3 values less than maxvalue);
alter table t1 reorganize partition p1,p2 into
( partition p2 values less than (to_days('2009-03-01')));
drop table t1;
CREATE TABLE t1 (id INT PRIMARY KEY, data INT) ENGINE = InnoDB
PARTITION BY RANGE(id) (
PARTITION p0 VALUES LESS THAN (5),
......
......@@ -5,6 +5,23 @@
drop table if exists t1;
--enable_warnings
#
# Bug#47029: Crash when reorganize partition with subpartition
#
create table t1 (a int not null,
b datetime not null,
primary key (a,b))
engine=innodb
partition by range (to_days(b))
subpartition by hash (a)
subpartitions 2
( partition p0 values less than (to_days('2009-01-01')),
partition p1 values less than (to_days('2009-02-01')),
partition p2 values less than (to_days('2009-03-01')),
partition p3 values less than maxvalue);
alter table t1 reorganize partition p1,p2 into
( partition p2 values less than (to_days('2009-03-01')));
drop table t1;
#
# Bug#40595: Non-matching rows not released with READ-COMMITTED on tables
# with partitions
......
......@@ -705,6 +705,7 @@ int ha_partition::rename_partitions(const char *path)
if (m_is_sub_partitioned)
{
List_iterator<partition_element> sub_it(part_elem->subpartitions);
j= 0;
do
{
sub_elem= sub_it++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment