set global innodb_rds_flashback_enabled = false; create table tt (a int); create table pp (a int); create view vv as select * from pp; create table scn (a int, scn int); drop table scn; select * from tt as of scn 1; a select * from tt as of scn 1 alias; a select * from tt as of scn 1 as alias; a select * from tt as of timestamp now() as alias; a select * from tt as of timestamp now() alias; a select * from tt as of timestamp now(); a select * from (select * from tt as of scn 1 as alias union all select * from tt as of timestamp now()) ff; a with ff as (select * from tt as of scn 1 as alias union all select * from tt as of timestamp now()) select * from ff; a with ff as (select * from tt as of scn 1 as alias union all select * from tt as of timestamp now()) update pp set a=0 where a=(select max(a) from ff); select * from pp where a=(select max(a) from tt as of scn 1 as alias); a select * from tt group by a having a< (select sum(a) from pp as of scn 1 as alias); a update tt set a=0 where a < (select sum(a) from pp as of scn 1 as alias); select ll.* from tt as of timestamp now() ll join pp as of scn 1 as vv on vv.a=ll.a; a select * from tt as of scn (select 1+2); a select * from tt as of scn (1+2); a select * from tt as of timestamp (select date_add(current_timestamp, interval 1 day)); a select * from tt as of timestamp date_add(current_timestamp, interval 1 day); a insert into pp values(1); select * from tt as of scn (select max(a) from pp); a delete from pp; select * from tt as of timestamp now(); a select * from tt as of scn '123'; a select * from tt as of timestamp '2020-01-01 01:01:01'; a select * from tt as of scn (select sum(a) from pp); a select * from tt as of scn (select avg(a) from pp); ERROR HY000: Snapshot (as of) 'scn/gcn' must be of type integer select * from tt as of scn 0.11; ERROR HY000: Snapshot (as of) 'scn/gcn' must be of type integer select * from tt as of timestamp (1<2); ERROR HY000: Snapshot (as of) 'timestamp' must be of type timestamp select * from tt as of scn (a