mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
MDEV-15380 Index for versioned table gets corrupt after partitioning and DELETE
In a test case Update occurs between Search and Delete/Update. This corrupts rowid which Search saves for Delete/Update. Patch prevents this by using of HA_EXTRA_REMEMBER_POS and HA_EXTRA_RESTORE_POS in a partition code. This situation possibly occurs only with system versioning table and partition. MyISAM and Aria engines are affected. fix by midenok Closes #705
This commit is contained in:
committed by
Sergei Golubchik
parent
4ec8598c1d
commit
aa5683d12e
@@ -483,6 +483,24 @@ delete from t1 where a is not null;
|
||||
create or replace table t1 (i int) with system versioning partition by system_time limit 10 (partition p0 history, partition pn current);
|
||||
select * from t1 partition (p0) for system_time all;
|
||||
ERROR HY000: SYSTEM_TIME partitions in table `t1` does not support historical query
|
||||
# MDEV-15380 Index for versioned table gets corrupt after partitioning and DELETE
|
||||
create or replace table t1 (pk int primary key)
|
||||
engine=myisam
|
||||
with system versioning
|
||||
partition by key() partitions 3;
|
||||
set timestamp=1523466002.799571;
|
||||
insert into t1 values (11),(12);
|
||||
set timestamp=1523466004.169435;
|
||||
delete from t1 where pk in (11, 12);
|
||||
Same test but for Aria storage engine
|
||||
create or replace table t1 (pk int primary key)
|
||||
engine=aria
|
||||
with system versioning
|
||||
partition by key() partitions 3;
|
||||
set timestamp=1523466002.799571;
|
||||
insert into t1 values (11),(12);
|
||||
set timestamp=1523466004.169435;
|
||||
delete from t1 where pk in (11, 12);
|
||||
# Test cleanup
|
||||
drop database test;
|
||||
create database test;
|
||||
|
Reference in New Issue
Block a user