summaryrefslogtreecommitdiff
path: root/mysql-test/suite/versioning/t/select.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/versioning/t/select.test')
-rw-r--r--mysql-test/suite/versioning/t/select.test26
1 files changed, 24 insertions, 2 deletions
diff --git a/mysql-test/suite/versioning/t/select.test b/mysql-test/suite/versioning/t/select.test
index ac8406320e8..bb154f0b248 100644
--- a/mysql-test/suite/versioning/t/select.test
+++ b/mysql-test/suite/versioning/t/select.test
@@ -41,7 +41,7 @@ if ($MTR_COMBINATION_TRX_ID)
{
--disable_query_log
set @x1= @t1;
- select vtq_commit_ts(@x1) into @t1;
+ select trt_commit_ts(@x1) into @t1;
--enable_query_log
}
@@ -221,6 +221,8 @@ select x from t1 for system_time as of timestamp @ts;
set @ts= timestamp'1-1-1 0:0:0';
+select x from t1 for system_time as of timestamp @ts;
+
--echo ## TRANSACTION specifier
select x from t1 for system_time as of transaction @trx_start;
@@ -326,6 +328,26 @@ select f1 from t1 join t2 left join t3 left join t4 on f3 = f4 on f3 = f2;
drop view v1;
drop table t1, t2, t3, t4;
-call verify_vtq_dummy(34);
+--echo #
+--echo # MDEV-15980 FOR SYSTEM_TIME BETWEEN and FROM .. TO work with negative intervals
+--echo #
+--replace_result $sys_datatype_expl SYS_DATATYPE
+eval create or replace table t1 (
+ a int,
+ row_start $sys_datatype_expl as row start invisible,
+ row_end $sys_datatype_expl as row end invisible,
+ period for system_time (row_start, row_end)
+) with system versioning;
+insert into t1 values (1);
+delete from t1;
+select row_start from t1 for system_time all into @t1;
+select row_end from t1 for system_time all into @t2;
+select * from t1 for system_time between @t1 and @t2;
+select * from t1 for system_time between @t2 and @t1;
+select * from t1 for system_time from @t1 to @t2;
+select * from t1 for system_time from @t2 to @t1;
+drop table t1;
+
+call verify_trt_dummy(34);
-- source suite/versioning/common_finish.inc