1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-30 05:23:50 +03:00

Parser, SQL: table-specific FOR SYSTEM_TIME [closes #116]

* Syntax sugar: query-global QUERY FOR SYSTEM_TIME
This commit is contained in:
Aleksey Midenkov
2017-01-13 13:56:01 +00:00
parent 57692d7117
commit 3a64d55aed
11 changed files with 154 additions and 117 deletions

View File

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