1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-17091 - Assertion failed after dropping versioning

Assertion `old_part_id == m_last_part' failed in ha_partition::update_row or `part_id == m_last_part' in ha_partition::delete_row upon UPDATE/DELETE after dropping versioning

PRIMARY KEY change hadn't been treated as partition reorganization in case of partitioning by KEY() (without parameters).

* set `*partition_changed= true` in the described case.
* since add/drop system versioning does not affect alter_info->key_list, it required separate attention
This commit is contained in:
Nikita Malyavin
2020-04-02 22:37:36 +10:00
committed by GitHub
parent b40b3720cb
commit 9149017bb8
5 changed files with 112 additions and 0 deletions

View File

@ -123,3 +123,22 @@ alter table t1 add partition (partition p1);
--error ER_SAME_NAME_PARTITION
alter table t1 add partition (partition p1);
drop table t1;
--echo #
--echo # MDEV-17091 Assertion `old_part_id == m_last_part' failed in
--echo # ha_partition::update_row or `part_id == m_last_part' in
--echo # ha_partition::delete_row upon UPDATE/DELETE after dropping versioning
--echo #
create or replace table t1 (pk int, f int, primary key(pk, f)) engine=innodb
partition by key() partitions 2;
insert into t1 values (1,10),(2,11);
--echo # expected to hit same partition
select * from t1 partition (p0);
alter table t1 drop primary key, drop f, add primary key(pk);
--echo # 1 and 2 are expected to be in different partitions
select * from t1 partition(p0);
select * from t1 partition(p1);
delete from t1;
drop table t1;