1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-16973 Application-time periods: DELETE

* inject portion of time updates into mysql_delete main loop
* triggered case emits delete+insert, no updates
* PORTION OF `SYSTEM_TIME` is forbidden
* `DELETE HISTORY .. FOR PORTION OF ...` is forbidden as well
This commit is contained in:
Nikita Malyavin
2019-02-04 09:37:58 +10:00
committed by Sergei Golubchik
parent 073c93b194
commit 47e28a94d5
15 changed files with 1048 additions and 128 deletions

View File

@ -194,6 +194,40 @@ NULL NULL 2 1
NULL NULL 3 1
drop table t1;
drop table t2;
create or replace table t1(x int) with system versioning;
insert into t1 values (1);
delete from t1;
insert into t1 values (2);
delete from t1;
insert into t1 values (3);
delete from t1;
select row_start into @start1 from t1 for system_time all where x = 1;
select row_end into @end1 from t1 for system_time all where x = 1;
select row_start into @start2 from t1 for system_time all where x = 2;
select row_end into @end2 from t1 for system_time all where x = 2;
select row_start into @start3 from t1 for system_time all where x = 3;
select row_end into @end3 from t1 for system_time all where x = 3;
select x as ASOF_x from t1 for system_time as of @start2;
ASOF_x
2
select x as ASOF_x from t1 for system_time as of @end2;
ASOF_x
select x as FROMTO_x from t1 for system_time from @start1 to @end3;
FROMTO_x
1
2
3
select x as FROMTO_x from t1 for system_time from @end1 to @start2;
FROMTO_x
select x as BETWAND_x from t1 for system_time between @start1 and @end3;
BETWAND_x
1
2
3
select x as BETWAND_x from t1 for system_time between @end1 and @start2;
BETWAND_x
2
drop table t1;
create table t1(
A int
) with system versioning;