diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2018-02-16 19:07:32 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-02-23 15:33:23 +0100 |
commit | f1bd02d99416649717c1f73d9f44b3474736f192 (patch) | |
tree | 87706ac1e2507051600e3a8feb7a3b0de9743299 /mysql-test/suite/versioning/r | |
parent | e2f70d6e101278747967f1caa66ea6bef4082ab3 (diff) | |
download | mariadb-git-f1bd02d99416649717c1f73d9f44b3474736f192.tar.gz |
MDEV-15004 parser greedily parses AS OF TIMESTAMP
* TIMESTAMP precedence fixed.
Diffstat (limited to 'mysql-test/suite/versioning/r')
-rw-r--r-- | mysql-test/suite/versioning/r/delete.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/foreign.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/select.result | 12 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/select2.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/view.result | 2 |
5 files changed, 18 insertions, 8 deletions
diff --git a/mysql-test/suite/versioning/r/delete.result b/mysql-test/suite/versioning/r/delete.result index 79f619fecdd..983df50d676 100644 --- a/mysql-test/suite/versioning/r/delete.result +++ b/mysql-test/suite/versioning/r/delete.result @@ -63,7 +63,7 @@ select sys_start into @sys_start from t1; delete from t1; select * from t1; select x = 1 as A, sys_start = @sys_start as B, sys_end > sys_start as C -from t1 for system_time between timestamp '0-0-0' and timestamp '2038-01-19 04:14:07'; +from t1 for system_time all; drop table t1; end~~ create or replace procedure test_03( @@ -91,8 +91,8 @@ select x as t2_x from t2; delete t1, t2 from t1 join t2 where t1.x = t2.x; select x as t1_x from t1; select x as t2_x from t2; -select x as t1_x_all from t1 for system_time between timestamp '0-0-0' and timestamp '2038-01-19 04:14:07'; -select x as t2_x_all from t2 for system_time between timestamp '0-0-0' and timestamp '2038-01-19 04:14:07'; +select x as t1_x_all from t1 for system_time all; +select x as t2_x_all from t2 for system_time all; drop table t1; drop table t2; end~~ diff --git a/mysql-test/suite/versioning/r/foreign.result b/mysql-test/suite/versioning/r/foreign.result index ca2459f784a..1e288e2a176 100644 --- a/mysql-test/suite/versioning/r/foreign.result +++ b/mysql-test/suite/versioning/r/foreign.result @@ -25,7 +25,7 @@ update parent set id=id+1; ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) delete from child; update parent set id=id+1; -select * from child for system_time from timestamp '1-1-1' to timestamp now(6); +select * from child for system_time from timestamp 0 to timestamp now(6); parent_id 1 1 @@ -165,7 +165,7 @@ delete from child where parent_id = 1; delete from parent where id = 1; select * from child; parent_id -select * from child for system_time from timestamp '1-1-1' to timestamp now(6); +select * from child for system_time from timestamp 0 to timestamp now(6); parent_id 1 1 diff --git a/mysql-test/suite/versioning/r/select.result b/mysql-test/suite/versioning/r/select.result index 1f7e0306b9b..2ece11fdf6b 100644 --- a/mysql-test/suite/versioning/r/select.result +++ b/mysql-test/suite/versioning/r/select.result @@ -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); diff --git a/mysql-test/suite/versioning/r/select2.result b/mysql-test/suite/versioning/r/select2.result index 79c4416a291..4ec07b1b69e 100644 --- a/mysql-test/suite/versioning/r/select2.result +++ b/mysql-test/suite/versioning/r/select2.result @@ -273,7 +273,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; diff --git a/mysql-test/suite/versioning/r/view.result b/mysql-test/suite/versioning/r/view.result index f94cf4567db..3a85f918623 100644 --- a/mysql-test/suite/versioning/r/view.result +++ b/mysql-test/suite/versioning/r/view.result @@ -79,7 +79,7 @@ create or replace view vt12 as select * from t1 cross join t2; select * from vt12; a b 1 2 -create or replace view vt12 as select * from t1 for system_time as of timestamp '0-0-0' cross join t2; +create or replace view vt12 as select * from t1 for system_time as of timestamp ('0-0-0') cross join t2; select * from vt12; a b # VIEW improvements [#183] |