Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
create or replace table t (id int, s date, e date, period for apptime(s, e)); |
insert into t values (1, '1999-01-01', '2018-12-12'); |
create or replace table t1 (z int); |
insert into t1 values (1); |
update t for portion of apptime from '2000-01-01' to '2018-01-01', set t.id= t.id + 5; |
select * from t; |
Expected result:
+------+------------+------------+
|
| id | s | e |
|
+------+------------+------------+
|
| 6 | 2000-01-01 | 2018-01-01 |
|
| 1 | 1999-01-01 | 2000-01-01 |
|
| 1 | 2018-01-01 | 2018-12-12 |
|
+------+------------+------------+
|
create or replace table t (id int, s date, e date, period for apptime(s,e)); |
insert into t values(1, '1999-01-01', '2018-12-12'); |
insert into t values(2, '1999-01-01', '2017-01-01'); |
insert into t values(3, '2002-01-01', '2017-01-01'); |
insert into t values(4, '1998-01-01', '2018-12-12'); |
insert into t values(5, '1997-01-01', '2015-01-01'); |
insert into t values(6, '2016-01-01', '2020-01-01'); |
create or replace table t1 (id int, s date, e date, period for apptime(s,e)); |
insert t1 select * from t; |
select * from t; |
delete t, t1 from t for portion of apptime from '2000-01-01' to '2018-01-01', t1; |
select * from t; |
Expected result:
delete from t for portion of apptime from '2000-01-01' to '2018-01-01';
|
+------+------------+------------+
|
| id | s | e |
|
+------+------------+------------+
|
| 1 | 1999-01-01 | 2000-01-01 |
|
| 2 | 1999-01-01 | 2000-01-01 |
|
| 4 | 1998-01-01 | 2000-01-01 |
|
| 5 | 1997-01-01 | 2000-01-01 |
|
| 6 | 2018-01-01 | 2020-01-01 |
|
| 1 | 2018-01-01 | 2018-12-12 |
|
| 4 | 2018-01-01 | 2018-12-12 |
|
+------+------------+------------+
|
Attachments
Issue Links
- is part of
-
MDEV-18928 Application-time periods support (phase 2)
- Closed