[MDEV-28411] LIMIT partition switching doesn't work until the end of statement Created: 2022-04-25  Updated: 2022-05-06

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.3
Fix Version/s: 10.3

Type: Bug Priority: Minor
Reporter: Aleksey Midenkov Assignee: Aleksey Midenkov
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-28337 Update documentation for SYSTEM_TIME ... Stalled

 Description   

History partition cannot be switched while the command is running.

Reproduce

-- source include/have_partition.inc
-- source include/have_sequence.inc
 
create or replace table t1 (x int)
with system versioning
partition by system_time limit 100 (
  partition p0 history,
  partition p1 history,
  partition pn current);
 
insert into t1 select seq from seq_0_to_199;
 
--echo # Expected 100 rows in p0 and 100 rows in p1
delete from t1 where x < 150;
delete from t1;
select count(*) from t1 partition (p0);
select count(*) from t1 partition (p1);
drop table t1;

Result

select count(*) from t1 partition (p0);
count(*)
150
select count(*) from t1 partition (p1);
count(*)
50

Expected

select count(*) from t1 partition (p0);
count(*)
100
select count(*) from t1 partition (p1);
count(*)
100



 Comments   
Comment by Sergei Golubchik [ 2022-05-05 ]

I thought it was an intentional design decision, we've considered this limitation and agreed it's fine and we can live with it

Generated at Thu Feb 08 10:00:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.