1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

SQL, Tests: temporal_current_timestamp for setting default AS OF timestamp [closes #117]

This commit is contained in:
kevg
2017-02-27 16:31:37 +03:00
committed by Aleksey Midenkov
parent fc7da4dd4f
commit b8bfc06b26
6 changed files with 98 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
create table t (a int) with system versioning;
insert into t values (1);
update t set a=2;
select * from t;
show variables where Variable_name like "temporal_current_timestamp%";
set global temporal_current_timestamp = '2031-1-1 0:0:0';
select * from t;
set global temporal_current_timestamp = '2011-1-1 0:0:0';
select * from t;
set global temporal_current_timestamp = 'all';
select * from t;
show variables where Variable_name like "temporal_current_timestamp%";
create view vt as select * from t;
select * from t;
drop view vt;
select * from (select * from t) as tt;
--error ER_GLOBAL_VARIABLE
set session temporal_current_timestamp = 'now';
drop table t;
set global temporal_current_timestamp = 'now';