| 1 |
create table t ( |
| 2 |
a int, |
| 3 |
b int without system versioning |
| 4 |
) with system versioning; |
| 5 |
|
| 6 |
insert into t values(1, 2); |
| 7 |
insert into t values(3, 4); |
| 8 |
select * from t; |
| 9 |
select a from t for system_time as of timestamp now(6); |
| 10 |
select a, b, b+0 from t for system_time as of timestamp now(6); |
| 11 |
select * from t for system_time as of timestamp now(6); |
| 12 |
select count(*) from t for system_time as of timestamp now(6) group by b; |
| 13 |
select * from t for system_time as of timestamp now(6) order by b asc; |
| 14 |
select * from t for system_time as of timestamp now(6) order by b desc; |
| 15 |
select * from t for system_time as of timestamp now(6) group by a having a=2; |
| 16 |
select * from t for system_time as of timestamp now(6) group by b having b=2; |
| 17 |
select a from t for system_time as of timestamp now(6) where b=2; |
| 18 |
select a from t for system_time as of timestamp now(6) where b=NULL; |
| 19 |
select a from t for system_time as of timestamp now(6) where b is NULL; |
| 20 |
select count(*), b from t for system_time as of timestamp now(6) group by b having b=NULL; |
| 21 |
select a, b from t; |
| 22 |
|
| 23 |
create or replace table t ( |
| 24 |
a int, |
| 25 |
b int not null without system versioning |
| 26 |
) with system versioning; |
| 27 |
|
| 28 |
insert into t values (1, 2), (3, 4); |
| 29 |
|
| 30 |
select * from t for system_time as of timestamp now(6); |
| 31 |
select * from t for system_time as of timestamp now(6) where b is NULL; |
| 32 |
|
| 33 |
# |
| 34 |
# MDEV-15062 Information Schema COLUMNS Table does not show system versioning information |
| 35 |
# |
| 36 |
create or replace table t (x int with system versioning, y int); |
| 37 |
select column_name, extra from information_schema.columns where table_name='t'; |
| 38 |
show create table t; |
| 39 |
|
| 40 |
drop table t; |