mirror of
https://github.com/MariaDB/server.git
synced 2025-12-12 08:01:43 +03:00
SQL, Tests: temporal_current_timestamp for setting default AS OF timestamp [closes #117]
This commit is contained in:
38
mysql-test/suite/versioning/r/variables.result
Normal file
38
mysql-test/suite/versioning/r/variables.result
Normal file
@@ -0,0 +1,38 @@
|
||||
create table t (a int) with system versioning;
|
||||
insert into t values (1);
|
||||
update t set a=2;
|
||||
select * from t;
|
||||
a
|
||||
2
|
||||
show variables where Variable_name like "temporal_current_timestamp%";
|
||||
Variable_name Value
|
||||
temporal_current_timestamp now
|
||||
set global temporal_current_timestamp = '2031-1-1 0:0:0';
|
||||
select * from t;
|
||||
a
|
||||
2
|
||||
set global temporal_current_timestamp = '2011-1-1 0:0:0';
|
||||
select * from t;
|
||||
a
|
||||
set global temporal_current_timestamp = 'all';
|
||||
select * from t;
|
||||
a
|
||||
2
|
||||
1
|
||||
show variables where Variable_name like "temporal_current_timestamp%";
|
||||
Variable_name Value
|
||||
temporal_current_timestamp all
|
||||
create view vt as select * from t;
|
||||
select * from t;
|
||||
a
|
||||
2
|
||||
1
|
||||
drop view vt;
|
||||
select * from (select * from t) as tt;
|
||||
a
|
||||
2
|
||||
1
|
||||
set session temporal_current_timestamp = 'now';
|
||||
ERROR HY000: Variable 'temporal_current_timestamp' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
drop table t;
|
||||
set global temporal_current_timestamp = 'now';
|
||||
Reference in New Issue
Block a user