mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
SQL: regression fix: make NOW a valid identifier again [#363]
* again, as in 10.2, NOW is a keyword only if followed by parentheses * use AS OF CURRENT_TIMESTAMP or AS OF NOW() * AS OF CURRENT_TIMESTAMP and AS OF NOW() mean AS OF NOW(6), not AS OF NOW(0), (same behavior as in a DEFAULT clause)
This commit is contained in:
committed by
Aleksey Midenkov
parent
d3845132fc
commit
ea1ccfa500
@ -152,13 +152,13 @@ y x
|
||||
with s3 as (select *, t1.sys_trx_end from t2, t1 for system_time as of timestamp @t0) select * from s3;
|
||||
y x
|
||||
10 1
|
||||
select * from (select *, t1.sys_trx_start from t2 for system_time as of now, t1) as s4 for system_time as of timestamp @t0;
|
||||
select * from (select *, t1.sys_trx_start from t2 for system_time as of current_timestamp, t1) as s4 for system_time as of timestamp @t0;
|
||||
y x
|
||||
10 1
|
||||
with s5 as (select *, t1.sys_trx_start from t2 for system_time as of now, t1) select * from s5 for system_time as of timestamp @t0;
|
||||
with s5 as (select *, t1.sys_trx_start from t2 for system_time as of current_timestamp, t1) select * from s5 for system_time as of timestamp @t0;
|
||||
y x
|
||||
10 1
|
||||
with s6 as (select *, t1.sys_trx_start from t2 for system_time as of now, t1) select * from s6 for system_time as of timestamp @t0;
|
||||
with s6 as (select *, t1.sys_trx_start from t2 for system_time as of current_timestamp, t1) select * from s6 for system_time as of timestamp @t0;
|
||||
y x
|
||||
10 1
|
||||
set @q= concat("create view vt1 as select * from t1 for system_time as of timestamp '", @t0, "'");
|
||||
@ -174,7 +174,7 @@ x y
|
||||
select * from (select *, vt1.sys_trx_end from t2, vt1) as s0;
|
||||
y x
|
||||
10 1
|
||||
select * from (select *, vt1.sys_trx_start from t2 for system_time as of now, vt1) as s0 for system_time as of timestamp @t0;
|
||||
select * from (select *, vt1.sys_trx_start from t2 for system_time as of current_timestamp, vt1) as s0 for system_time as of timestamp @t0;
|
||||
y x
|
||||
10 1
|
||||
drop table t1, t2;
|
||||
|
Reference in New Issue
Block a user