1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-15004 parser greedily parses AS OF TIMESTAMP

* TIMESTAMP precedence fixed.
This commit is contained in:
Aleksey Midenkov
2018-02-16 19:07:32 +01:00
committed by Sergei Golubchik
parent e2f70d6e10
commit f1bd02d994
11 changed files with 63 additions and 31 deletions

View File

@ -248,7 +248,7 @@ a b
select * from (select * from (select * from t1 cross join t2) as tmp1) as tmp2;
a b
1 2
select * from (select * from t1 cross join t2 for system_time as of timestamp '0-0-0') as tmp;
select * from (select * from t1 cross join t2 for system_time as of timestamp ('0-0-0')) as tmp;
a b
create or replace table t1(a1 int) with system versioning;
create or replace table t2(a2 int) with system versioning;
@ -475,6 +475,16 @@ f1 f2 f3 f1 f2 f3 f4
3 3 NULL NULL 3 1 1
3 3 NULL NULL 3 2 1
4 NULL NULL NULL NULL NULL NULL
### MDEV-15004 parser greedily parses AS OF TIMESTAMP
select timestamp'2016-02-30 08:07:06';
ERROR HY000: Incorrect DATETIME value: '2016-02-30 08:07:06'
select * from t1 for system_time as of timestamp'2016-02-30 08:07:06';
ERROR HY000: Incorrect DATETIME value: '2016-02-30 08:07:06'
select timestamp('2003-12-31 12:00:00','12:00:00');
timestamp('2003-12-31 12:00:00','12:00:00')
2004-01-01 00:00:00
select * from t1 for system_time as of timestamp('2003-12-31 12:00:00','12:00:00');
f1
drop view v1;
drop table t1, t2, t3, t4;
call verify_vtq_dummy(34);