diff options
author | Eugene Kosov <claprix@yandex.ru> | 2018-05-17 09:33:04 +0300 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-05-22 13:11:14 +0200 |
commit | aa5683d12e653a743f89b3ace87c62b97bd96dd2 (patch) | |
tree | 17bfefedaef2d05c22af9ad603d2770ce0ed96a2 /mysql-test/suite/versioning/t | |
parent | 4ec8598c1dcb63499bce998142b8e5b8b09b2d30 (diff) | |
download | mariadb-git-aa5683d12e653a743f89b3ace87c62b97bd96dd2.tar.gz |
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
Diffstat (limited to 'mysql-test/suite/versioning/t')
-rw-r--r-- | mysql-test/suite/versioning/t/partition.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test index 02357f1a7ae..d9e784b082b 100644 --- a/mysql-test/suite/versioning/t/partition.test +++ b/mysql-test/suite/versioning/t/partition.test @@ -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; |