mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Vers SQL: partition rotation by INTERVAL fix
Update partition stats on ha_partition::write_row()
This commit is contained in:
committed by
Sergei Golubchik
parent
45e1c9bb6d
commit
df0e1817c7
@@ -122,7 +122,6 @@ alter table t1 add partition (partition px history);
|
||||
|
||||
|
||||
--echo ## INSERT, UPDATE, DELETE
|
||||
|
||||
create or replace table t1 (x int)
|
||||
with system versioning
|
||||
partition by system_time (
|
||||
@@ -241,6 +240,7 @@ partition by system_time interval 0 second (
|
||||
partition p1 history,
|
||||
partition pn current);
|
||||
|
||||
--echo ### ha_partition::update_row() check
|
||||
create or replace table t1 (x int)
|
||||
with system versioning
|
||||
partition by system_time interval 1 second (
|
||||
@@ -248,14 +248,29 @@ partition by system_time interval 1 second (
|
||||
partition p1 history,
|
||||
partition pn current);
|
||||
|
||||
insert into t1 values (1), (2), (3);
|
||||
insert into t1 values (1), (2), (3), (4);
|
||||
select * from t1 partition (pn);
|
||||
delete from t1;
|
||||
select * from t1 partition (p0);
|
||||
delete from t1 where x < 3;
|
||||
|
||||
--sleep 2
|
||||
insert into t1 values (4);
|
||||
delete from t1;
|
||||
|
||||
select * from t1 partition (p0) order by x;
|
||||
select * from t1 partition (p1) order by x;
|
||||
|
||||
--echo ### ha_partition::write_row() check
|
||||
create or replace table t1 (x int)
|
||||
with system versioning
|
||||
partition by system_time interval 1 second (
|
||||
partition p0 history,
|
||||
partition p1 history,
|
||||
partition pn current);
|
||||
|
||||
insert into t1 values (1);
|
||||
update t1 set x= 2;
|
||||
sleep 2;
|
||||
update t1 set x= 3;
|
||||
select * from t1 partition (p0);
|
||||
select * from t1 partition (p1);
|
||||
|
||||
--echo ## Subpartitions
|
||||
|
Reference in New Issue
Block a user