mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +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
@ -430,6 +430,25 @@ create or replace table t1 (i int) with system versioning partition by system_ti
|
||||
--error ER_VERS_QUERY_IN_PARTITION
|
||||
select * from t1 partition (p0) for system_time all;
|
||||
|
||||
--echo # 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);
|
||||
--echo 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);
|
||||
|
||||
--echo # Test cleanup
|
||||
drop database test;
|
||||
create database test;
|
||||
|
Reference in New Issue
Block a user