summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2017-08-08 17:12:16 +0300
committerGitHub <noreply@github.com>2017-08-08 17:12:16 +0300
commitd3d2ea9fd59a836dd0b0577658c5961712a5ed9d (patch)
tree2c146dff86192cd7073380c2b6632ea7ac8ed2f2 /mysql-test
parent53370de103a58bff2d6c566f411e58d70bd5d446 (diff)
downloadmariadb-git-d3d2ea9fd59a836dd0b0577658c5961712a5ed9d.tar.gz
SQL, Parser: system_time logic and syntax fixes [closes #237]
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/versioning/r/alter.result8
-rw-r--r--mysql-test/suite/versioning/r/create.result32
-rw-r--r--mysql-test/suite/versioning/r/select.result52
-rw-r--r--mysql-test/suite/versioning/r/select_sp.result64
-rw-r--r--mysql-test/suite/versioning/r/sysvars.result4
-rw-r--r--mysql-test/suite/versioning/r/truncate.result20
-rw-r--r--mysql-test/suite/versioning/t/alter.test6
-rw-r--r--mysql-test/suite/versioning/t/create.test30
-rw-r--r--mysql-test/suite/versioning/t/select.test18
-rw-r--r--mysql-test/suite/versioning/t/select_sp.test18
-rw-r--r--mysql-test/suite/versioning/t/sysvars.test4
-rw-r--r--mysql-test/suite/versioning/t/truncate.test20
12 files changed, 51 insertions, 225 deletions
diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result
index 4e58ac8e5f8..14cb242d09e 100644
--- a/mysql-test/suite/versioning/r/alter.result
+++ b/mysql-test/suite/versioning/r/alter.result
@@ -8,8 +8,6 @@ t CREATE TABLE `t` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t without system versioning;
ERROR HY000: Wrong parameters for `t`: table is not versioned
-alter table t with system versioning without system versioning;
-ERROR HY000: Wrong parameters for `t`: multiple 'WITH/WITHOUT SYSTEM VERSIONING'
alter table t with system versioning;
show create table t;
Table Create Table
@@ -226,10 +224,8 @@ t CREATE TABLE `t` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t modify a int with system versioning;
ERROR HY000: Wrong parameters for `t`: table is not versioned
-alter table t modify a int with system versioning with system versioning;
-ERROR HY000: Wrong parameters for `t`: multiple 'WITH/WITHOUT SYSTEM VERSIONING' for `a`
-alter table t modify a int with system versioning without system versioning;
-ERROR HY000: Wrong parameters for `t`: multiple 'WITH/WITHOUT SYSTEM VERSIONING' for `a`
+alter table t modify a int without system versioning;
+ERROR HY000: Wrong parameters for `t`: table is not versioned
alter table t with system versioning;
alter table t modify a int without system versioning;
show create table t;
diff --git a/mysql-test/suite/versioning/r/create.result b/mysql-test/suite/versioning/r/create.result
index 32b8d1c97a7..b71e84ccc08 100644
--- a/mysql-test/suite/versioning/r/create.result
+++ b/mysql-test/suite/versioning/r/create.result
@@ -103,7 +103,7 @@ Sys_start2 SYS_TRX_TYPE generated always as row start,
Sys_end SYS_TRX_TYPE generated always as row end,
period for system_time (Sys_start, Sys_end)
) with system versioning;
-ERROR HY000: Wrong parameters for `t1`: multiple 'AS ROW START' (`Sys_start2`, `Sys_start`)
+ERROR HY000: Wrong parameters for `t1`: mismatch 'PERIOD FOR SYSTEM_TIME' and 'AS ROW START'
create or replace table t1 (
x4 int unsigned,
Sys_start SYS_TRX_TYPE generated always as row start,
@@ -118,7 +118,7 @@ Sys_end SYS_TRX_TYPE generated always as row end,
Sys_end2 SYS_TRX_TYPE generated always as row end,
period for system_time (Sys_start, Sys_end)
) with system versioning;
-ERROR HY000: Wrong parameters for `t1`: multiple 'AS ROW END' (`Sys_end2`, `Sys_end`)
+ERROR HY000: Wrong parameters for `t1`: mismatch 'PERIOD FOR SYSTEM_TIME' and 'AS ROW END'
create or replace table t1 (
x6 int unsigned,
period for system_time (Sys_start, Sys_end)
@@ -131,7 +131,7 @@ Sys_end SYS_TRX_TYPE generated always as row end,
Sys_end2 SYS_TRX_TYPE generated always as row end,
period for system_time (Sys_start, Sys_end)
);
-ERROR HY000: Wrong parameters for `t1`: multiple 'AS ROW END' (`Sys_end2`, `Sys_end`)
+ERROR HY000: Wrong parameters for `t1`: missing 'WITH SYSTEM VERSIONING'
create or replace table t1 (
x8 int unsigned,
Sys_start SYS_TRX_TYPE generated always as row start,
@@ -152,7 +152,7 @@ Sys_start SYS_TRX_TYPE generated always as row start,
Sys_end SYS_TRX_TYPE generated always as row end,
period for system_time (Sys_start, Sys_start)
);
-ERROR HY000: Wrong parameters for `t1`: multiple `Sys_start` for 'PERIOD FOR SYSTEM_TIME'
+ERROR HY000: Wrong parameters for `t1`: missing 'WITH SYSTEM VERSIONING'
create or replace table t1 (
x11 int unsigned,
Sys_start bigint unsigned generated always as row start,
@@ -257,34 +257,10 @@ create or replace table t1 (
A8 int without system versioning
) with system versioning;
ERROR HY000: Wrong parameters for `t1`: no columns defined 'WITH SYSTEM VERSIONING'
-create or replace table t1 (
-A9 int without system versioning with system versioning
-);
-ERROR HY000: Wrong parameters for `t1`: multiple 'WITH/WITHOUT SYSTEM VERSIONING' for `A9`
-create or replace table t1 (
-A10 int with system versioning without system versioning
-);
-ERROR HY000: Wrong parameters for `t1`: multiple 'WITH/WITHOUT SYSTEM VERSIONING' for `A10`
create table t(
a11 int
) without system versioning;
ERROR HY000: Wrong parameters for `t`: not allowed 'WITHOUT SYSTEM VERSIONING'
-create or replace table t1 (
-A12 int
-) without system versioning with system versioning;
-ERROR HY000: Wrong parameters for `t1`: multiple 'WITH/WITHOUT SYSTEM VERSIONING'
-create or replace table t1 (
-A13 int
-) with system versioning without system versioning;
-ERROR HY000: Wrong parameters for `t1`: multiple 'WITH/WITHOUT SYSTEM VERSIONING'
-create or replace table t1 (
-A14 int
-) with system versioning with system versioning;
-ERROR HY000: Wrong parameters for `t1`: multiple 'WITH/WITHOUT SYSTEM VERSIONING'
-create or replace table t1 (
-A15 int
-) without system versioning without system versioning;
-ERROR HY000: Wrong parameters for `t1`: multiple 'WITH/WITHOUT SYSTEM VERSIONING'
create or replace table t1 (a int) with system versioning;
create temporary table tmp with system versioning select * from t1;
create or replace table t1 (a int) with system versioning;
diff --git a/mysql-test/suite/versioning/r/select.result b/mysql-test/suite/versioning/r/select.result
index 8599cb92b52..eabeaf0d85a 100644
--- a/mysql-test/suite/versioning/r/select.result
+++ b/mysql-test/suite/versioning/r/select.result
@@ -102,7 +102,7 @@ ASOF_x y
7 107
8 108
9 109
-select x as FROMTO_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
+select x as FROMTO_x, y from t1 for system_time from '0-0-0 0:0:0' to timestamp @t1;
FROMTO_x y
0 100
1 101
@@ -114,7 +114,7 @@ FROMTO_x y
7 107
8 108
9 109
-select x as BETWAND_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
+select x as BETWAND_x, y from t1 for system_time between '0-0-0 0:0:0' and timestamp @t1;
BETWAND_x y
0 100
1 101
@@ -127,31 +127,6 @@ BETWAND_x y
8 108
9 109
3 33
-select x as FROMTO_ext_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
-FROMTO_ext_x y
-0 100
-1 101
-2 102
-3 103
-4 104
-5 105
-6 106
-7 107
-8 108
-9 109
-select x as BETWAND_ext_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
-BETWAND_ext_x y
-0 100
-1 101
-2 102
-3 103
-4 104
-5 105
-6 106
-7 107
-8 108
-9 109
-3 33
select x as ALL_x, y from t1 for system_time all;
ALL_x y
0 100
@@ -199,29 +174,6 @@ BETWAND2_x y
8 108
9 109
3 33
-FROMTO2_ext_x y
-0 100
-1 101
-2 102
-3 103
-4 104
-5 105
-6 106
-7 107
-8 108
-9 109
-BETWAND2_ext_x y
-0 100
-1 101
-2 102
-3 103
-4 104
-5 105
-6 106
-7 107
-8 108
-9 109
-3 33
create or replace table t1 (
x int unsigned,
y int unsigned
diff --git a/mysql-test/suite/versioning/r/select_sp.result b/mysql-test/suite/versioning/r/select_sp.result
index 9ced07f03e1..69fbc1255f1 100644
--- a/mysql-test/suite/versioning/r/select_sp.result
+++ b/mysql-test/suite/versioning/r/select_sp.result
@@ -100,23 +100,17 @@ select vtq_commit_ts(@x1) into @t1;
end if;
select x, y from t1;
select x as ASOF_x, y from t1 for system_time as of timestamp @t0;
-select x as FROMTO_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
-select x as BETWAND_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
-select x as FROMTO_ext_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
-select x as BETWAND_ext_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
+select x as FROMTO_x, y from t1 for system_time from '0-0-0 0:0:0' to timestamp @t1;
+select x as BETWAND_x, y from t1 for system_time between '0-0-0 0:0:0' and timestamp @t1;
select x as ALL_x, y from t1 for system_time all;
if engine = 'innodb' then
-select x as ASOF2_x, y from t1 for system_time as of transaction @x0;
-select x as FROMTO2_x, y from t1 for system_time from transaction @x0 to transaction @x1;
+select x as ASOF2_x, y from t1 for system_time as of @x0;
+select x as FROMTO2_x, y from t1 for system_time from @x0 to @x1;
select x as BETWAND2_x, y from t1 for system_time between transaction @x0 and transaction @x1;
-select x as FROMTO2_ext_x, y from t1 for system_time transaction from @x0 to @x1;
-select x as BETWAND2_ext_x, y from t1 for system_time transaction between @x0 and @x1;
else
-select x as ASOF2_x, y from t1 for system_time as of timestamp @t0;
-select x as FROMTO2_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
+select x as ASOF2_x, y from t1 for system_time as of @t0;
+select x as FROMTO2_x, y from t1 for system_time from '0-0-0 0:0:0' to @t1;
select x as BETWAND2_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
-select x as FROMTO2_ext_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
-select x as BETWAND2_ext_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
end if;
drop table t1;
end~~
@@ -198,29 +192,6 @@ BETWAND_x y
8 108
9 109
3 33
-FROMTO_ext_x y
-0 100
-1 101
-2 102
-3 103
-4 104
-5 105
-6 106
-7 107
-8 108
-9 109
-BETWAND_ext_x y
-0 100
-1 101
-2 102
-3 103
-4 104
-5 105
-6 106
-7 107
-8 108
-9 109
-3 33
ALL_x y
0 100
1 101
@@ -267,29 +238,6 @@ BETWAND2_x y
8 108
9 109
3 33
-FROMTO2_ext_x y
-0 100
-1 101
-2 102
-3 103
-4 104
-5 105
-6 106
-7 107
-8 108
-9 109
-BETWAND2_ext_x y
-0 100
-1 101
-2 102
-3 103
-4 104
-5 105
-6 106
-7 107
-8 108
-9 109
-3 33
call test_02();
IJ1_x1 y1 x2 y2
1 1 1 2
diff --git a/mysql-test/suite/versioning/r/sysvars.result b/mysql-test/suite/versioning/r/sysvars.result
index 56122432e6e..a9cc7d3aec3 100644
--- a/mysql-test/suite/versioning/r/sysvars.result
+++ b/mysql-test/suite/versioning/r/sysvars.result
@@ -115,11 +115,11 @@ select * from t for system_time all;
a sys_trx_start sys_trx_end
2 TIMESTAMP TIMESTAMP
1 TIMESTAMP TIMESTAMP
-select * from t for system_time timestamp from '0-0-0' to current_timestamp(6);
+select * from t for system_time from '0-0-0' to current_timestamp(6);
a sys_trx_start sys_trx_end
2 TIMESTAMP TIMESTAMP
1 TIMESTAMP TIMESTAMP
-select * from t for system_time timestamp between '0-0-0' and current_timestamp(6);
+select * from t for system_time between '0-0-0' and current_timestamp(6);
a sys_trx_start sys_trx_end
2 TIMESTAMP TIMESTAMP
1 TIMESTAMP TIMESTAMP
diff --git a/mysql-test/suite/versioning/r/truncate.result b/mysql-test/suite/versioning/r/truncate.result
index 5651cffb179..957163286c3 100644
--- a/mysql-test/suite/versioning/r/truncate.result
+++ b/mysql-test/suite/versioning/r/truncate.result
@@ -1,9 +1,9 @@
create table t (a int);
truncate t for system_time all;
-ERROR HY000: Unused clause: 'SYSTEM_TIME'
+ERROR HY000: System Versioning required: t
create procedure truncate_history_of_t()
begin
-prepare stmt from 'truncate t for system_time timestamp between \'1-1-1\' and now(6)';
+prepare stmt from 'truncate t for system_time between \'1-1-1\' and now(6)';
execute stmt;
drop prepare stmt;
end~~
@@ -34,12 +34,12 @@ a
4
2
3
-truncate t for system_time timestamp between '1-1-1' and now(6);
+truncate t for system_time between '1-1-1' and now(6);
select * from t for system_time all;
a
4
update t set a=5;
-truncate t for system_time timestamp from '1-1-1' to now(6);
+truncate t for system_time from '1-1-1' to now(6);
select * from t for system_time all;
a
5
@@ -52,13 +52,13 @@ set @ts1 = now(6);
update t set a=7;
set @ts2 = now(6);
update t set a=8;
-truncate t for system_time timestamp from '1-1-1' to @ts1;
+truncate t for system_time from '1-1-1' to @ts1;
select * from t for system_time all;
a
8
7
update t set a=9;
-truncate t for system_time timestamp between '1-1-1' and @ts2;
+truncate t for system_time between '1-1-1' and @ts2;
select * from t for system_time all;
a
9
@@ -82,12 +82,12 @@ a
4
2
3
-truncate t for system_time timestamp between '1-1-1' and now(6);
+truncate t for system_time between '1-1-1' and now(6);
select * from t for system_time all;
a
4
update t set a=5;
-truncate t for system_time timestamp from '1-1-1' to now(6);
+truncate t for system_time from '1-1-1' to now(6);
select * from t for system_time all;
a
5
@@ -100,13 +100,13 @@ set @ts1 = now(6);
update t set a=7;
set @ts2 = now(6);
update t set a=8;
-truncate t for system_time timestamp from '1-1-1' to @ts1;
+truncate t for system_time from '1-1-1' to timestamp @ts1;
select * from t for system_time all;
a
8
7
update t set a=9;
-truncate t for system_time timestamp between '1-1-1' and @ts2;
+truncate t for system_time between '1-1-1' and timestamp @ts2;
select * from t for system_time all;
a
9
diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test
index 30fee87f3fe..6ceac987a5e 100644
--- a/mysql-test/suite/versioning/t/alter.test
+++ b/mysql-test/suite/versioning/t/alter.test
@@ -4,8 +4,6 @@ create table t(
show create table t;
--error ER_VERS_WRONG_PARAMS
alter table t without system versioning;
---error ER_VERS_WRONG_PARAMS
-alter table t with system versioning without system versioning;
alter table t with system versioning;
show create table t;
@@ -118,9 +116,7 @@ show create table t;
--error ER_VERS_WRONG_PARAMS
alter table t modify a int with system versioning;
--error ER_VERS_WRONG_PARAMS
-alter table t modify a int with system versioning with system versioning;
---error ER_VERS_WRONG_PARAMS
-alter table t modify a int with system versioning without system versioning;
+alter table t modify a int without system versioning;
alter table t with system versioning;
diff --git a/mysql-test/suite/versioning/t/create.test b/mysql-test/suite/versioning/t/create.test
index 9c92cc30e2c..9de6a5157b3 100644
--- a/mysql-test/suite/versioning/t/create.test
+++ b/mysql-test/suite/versioning/t/create.test
@@ -192,16 +192,6 @@ create or replace table t1 (
A8 int without system versioning
) with system versioning;
---error ER_VERS_WRONG_PARAMS
-create or replace table t1 (
- A9 int without system versioning with system versioning
-);
-
---error ER_VERS_WRONG_PARAMS
-create or replace table t1 (
- A10 int with system versioning without system versioning
-);
-
# table with/without system versioning
--error ER_VERS_WRONG_PARAMS
@@ -209,26 +199,6 @@ create table t(
a11 int
) without system versioning;
---error ER_VERS_WRONG_PARAMS
-create or replace table t1 (
- A12 int
-) without system versioning with system versioning;
-
---error ER_VERS_WRONG_PARAMS
-create or replace table t1 (
- A13 int
-) with system versioning without system versioning;
-
---error ER_VERS_WRONG_PARAMS
-create or replace table t1 (
- A14 int
-) with system versioning with system versioning;
-
---error ER_VERS_WRONG_PARAMS
-create or replace table t1 (
- A15 int
-) without system versioning without system versioning;
-
create or replace table t1 (a int) with system versioning;
create temporary table tmp with system versioning select * from t1;
diff --git a/mysql-test/suite/versioning/t/select.test b/mysql-test/suite/versioning/t/select.test
index 5dc5f603d54..345e28f610c 100644
--- a/mysql-test/suite/versioning/t/select.test
+++ b/mysql-test/suite/versioning/t/select.test
@@ -42,28 +42,22 @@ if ($default_engine == 'innodb')
select x, y from t1;
select x as ASOF_x, y from t1 for system_time as of timestamp @t0;
-select x as FROMTO_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
-select x as BETWAND_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
-select x as FROMTO_ext_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
-select x as BETWAND_ext_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
+select x as FROMTO_x, y from t1 for system_time from '0-0-0 0:0:0' to timestamp @t1;
+select x as BETWAND_x, y from t1 for system_time between '0-0-0 0:0:0' and timestamp @t1;
select x as ALL_x, y from t1 for system_time all;
--disable_query_log
if ($default_engine == 'innodb')
{
- select x as ASOF2_x, y from t1 for system_time as of transaction @x0;
- select x as FROMTO2_x, y from t1 for system_time from transaction @x0 to transaction @x1;
+ select x as ASOF2_x, y from t1 for system_time as of @x0;
+ select x as FROMTO2_x, y from t1 for system_time from @x0 to @x1;
select x as BETWAND2_x, y from t1 for system_time between transaction @x0 and transaction @x1;
- select x as FROMTO2_ext_x, y from t1 for system_time transaction from @x0 to @x1;
- select x as BETWAND2_ext_x, y from t1 for system_time transaction between @x0 and @x1;
}
if ($default_engine != 'innodb')
{
- select x as ASOF2_x, y from t1 for system_time as of timestamp @t0;
- select x as FROMTO2_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
+ select x as ASOF2_x, y from t1 for system_time as of @t0;
+ select x as FROMTO2_x, y from t1 for system_time from '0-0-0 0:0:0' to @t1;
select x as BETWAND2_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
- select x as FROMTO2_ext_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
- select x as BETWAND2_ext_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
}
--enable_query_log
diff --git a/mysql-test/suite/versioning/t/select_sp.test b/mysql-test/suite/versioning/t/select_sp.test
index 23921e9580d..d261e1bc537 100644
--- a/mysql-test/suite/versioning/t/select_sp.test
+++ b/mysql-test/suite/versioning/t/select_sp.test
@@ -45,24 +45,18 @@ begin
select x, y from t1;
select x as ASOF_x, y from t1 for system_time as of timestamp @t0;
- select x as FROMTO_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
- select x as BETWAND_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
- select x as FROMTO_ext_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
- select x as BETWAND_ext_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
+ select x as FROMTO_x, y from t1 for system_time from '0-0-0 0:0:0' to timestamp @t1;
+ select x as BETWAND_x, y from t1 for system_time between '0-0-0 0:0:0' and timestamp @t1;
select x as ALL_x, y from t1 for system_time all;
if engine = 'innodb' then
- select x as ASOF2_x, y from t1 for system_time as of transaction @x0;
- select x as FROMTO2_x, y from t1 for system_time from transaction @x0 to transaction @x1;
+ select x as ASOF2_x, y from t1 for system_time as of @x0;
+ select x as FROMTO2_x, y from t1 for system_time from @x0 to @x1;
select x as BETWAND2_x, y from t1 for system_time between transaction @x0 and transaction @x1;
- select x as FROMTO2_ext_x, y from t1 for system_time transaction from @x0 to @x1;
- select x as BETWAND2_ext_x, y from t1 for system_time transaction between @x0 and @x1;
else
- select x as ASOF2_x, y from t1 for system_time as of timestamp @t0;
- select x as FROMTO2_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
+ select x as ASOF2_x, y from t1 for system_time as of @t0;
+ select x as FROMTO2_x, y from t1 for system_time from '0-0-0 0:0:0' to @t1;
select x as BETWAND2_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
- select x as FROMTO2_ext_x, y from t1 for system_time from timestamp '0-0-0 0:0:0' to timestamp @t1;
- select x as BETWAND2_ext_x, y from t1 for system_time between timestamp '0-0-0 0:0:0' and timestamp @t1;
end if;
drop table t1;
diff --git a/mysql-test/suite/versioning/t/sysvars.test b/mysql-test/suite/versioning/t/sysvars.test
index 4516833d58d..6b713c29239 100644
--- a/mysql-test/suite/versioning/t/sysvars.test
+++ b/mysql-test/suite/versioning/t/sysvars.test
@@ -84,9 +84,9 @@ select * from t for system_time as of timestamp current_timestamp(6);
--replace_regex /\d{4}-\d\d-\d\d \d\d:\d\d:\d\d\.\d{6}/TIMESTAMP/
select * from t for system_time all;
--replace_regex /\d{4}-\d\d-\d\d \d\d:\d\d:\d\d\.\d{6}/TIMESTAMP/
-select * from t for system_time timestamp from '0-0-0' to current_timestamp(6);
+select * from t for system_time from '0-0-0' to current_timestamp(6);
--replace_regex /\d{4}-\d\d-\d\d \d\d:\d\d:\d\d\.\d{6}/TIMESTAMP/
-select * from t for system_time timestamp between '0-0-0' and current_timestamp(6);
+select * from t for system_time between '0-0-0' and current_timestamp(6);
set versioning_hide= NEVER;
--replace_regex /\d{4}-\d\d-\d\d \d\d:\d\d:\d\d\.\d{6}/TIMESTAMP/
diff --git a/mysql-test/suite/versioning/t/truncate.test b/mysql-test/suite/versioning/t/truncate.test
index 97362c7423b..ddd0db5856d 100644
--- a/mysql-test/suite/versioning/t/truncate.test
+++ b/mysql-test/suite/versioning/t/truncate.test
@@ -1,13 +1,13 @@
-- source include/have_innodb.inc
create table t (a int);
---error ER_VERS_UNUSED_CLAUSE
+--error ER_VERSIONING_REQUIRED
truncate t for system_time all;
delimiter ~~;
create procedure truncate_history_of_t()
begin
- prepare stmt from 'truncate t for system_time timestamp between \'1-1-1\' and now(6)';
+ prepare stmt from 'truncate t for system_time between \'1-1-1\' and now(6)';
execute stmt;
drop prepare stmt;
end~~
@@ -34,11 +34,11 @@ update t set a=4;
truncate t for system_time as of timestamp now(6);
select * from t for system_time all;
-truncate t for system_time timestamp between '1-1-1' and now(6);
+truncate t for system_time between '1-1-1' and now(6);
select * from t for system_time all;
update t set a=5;
-truncate t for system_time timestamp from '1-1-1' to now(6);
+truncate t for system_time from '1-1-1' to now(6);
select * from t for system_time all;
update t set a=6;
@@ -49,10 +49,10 @@ set @ts1 = now(6);
update t set a=7;
set @ts2 = now(6);
update t set a=8;
-truncate t for system_time timestamp from '1-1-1' to @ts1;
+truncate t for system_time from '1-1-1' to @ts1;
select * from t for system_time all;
update t set a=9;
-truncate t for system_time timestamp between '1-1-1' and @ts2;
+truncate t for system_time between '1-1-1' and @ts2;
select * from t for system_time all;
@@ -69,11 +69,11 @@ update t set a=4;
truncate t for system_time as of timestamp now(6);
select * from t for system_time all;
-truncate t for system_time timestamp between '1-1-1' and now(6);
+truncate t for system_time between '1-1-1' and now(6);
select * from t for system_time all;
update t set a=5;
-truncate t for system_time timestamp from '1-1-1' to now(6);
+truncate t for system_time from '1-1-1' to now(6);
select * from t for system_time all;
update t set a=6;
@@ -84,10 +84,10 @@ set @ts1 = now(6);
update t set a=7;
set @ts2 = now(6);
update t set a=8;
-truncate t for system_time timestamp from '1-1-1' to @ts1;
+truncate t for system_time from '1-1-1' to timestamp @ts1;
select * from t for system_time all;
update t set a=9;
-truncate t for system_time timestamp between '1-1-1' and @ts2;
+truncate t for system_time between '1-1-1' and timestamp @ts2;
select * from t for system_time all;
create or replace table t (a int) with system versioning;