1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Parser: unreserve keywords

SELECT * FROM t1 FOR SYSTEM_TIME AS OF ...

becomes ambiguous, but it's the same as with

SELECT ... UNION SELECT ... ORDER BY ...
This commit is contained in:
Sergei Golubchik
2017-11-28 16:38:58 +01:00
committed by Aleksey Midenkov
parent 6ac773421f
commit 3198bc839d
13 changed files with 74 additions and 74 deletions

View File

@ -25,7 +25,7 @@ a b
3 NULL
Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query
select count(*) from t group by b system_time as of timestamp now(6);
select count(*) from t group by b for system_time as of timestamp now(6);
count(*)
2
Warnings:
@ -44,29 +44,29 @@ a b
Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query
Warning 4109 Attempt to read unversioned field `b` in historical query
select * from t group by a having a=2 system_time as of timestamp now(6);
select * from t group by a having a=2 for system_time as of timestamp now(6);
a b
Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query
select * from t group by b having b=2 system_time as of timestamp now(6);
select * from t group by b having b=2 for system_time as of timestamp now(6);
a b
Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query
select a from t where b=2 system_time as of timestamp now(6);
select a from t where b=2 for system_time as of timestamp now(6);
a
Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query
select a from t where b=NULL system_time as of timestamp now(6);
select a from t where b=NULL for system_time as of timestamp now(6);
a
Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query
select a from t where b is NULL system_time as of timestamp now(6);
select a from t where b is NULL for system_time as of timestamp now(6);
a
1
3
Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query
select count(*), b from t group by b having b=NULL system_time as of timestamp now(6);
select count(*), b from t group by b having b=NULL for system_time as of timestamp now(6);
count(*) b
Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query