Commit fd4153f0 authored by Aleksey Midenkov's avatar Aleksey Midenkov Committed by Sergei Golubchik

MDEV-16010 Too many rows with AS OF point_in_the_past_or_NULL

parent fddaaf72
......@@ -62,7 +62,7 @@ A B C D E F
1 1 1 1 1 1
select trt_trx_sees(0, @tx2);
trt_trx_sees(0, @tx2)
NULL
0
set transaction isolation level read uncommitted;
insert into t1 values ();
select sys_trx_start from t1 where id = last_insert_id() into @tx3;
......
......@@ -153,5 +153,18 @@ select x, row_start < row_end from t1 for system_time all;
x row_start < row_end
4 1
2 1
# MDEV-16010 Too many rows with AS OF point_in_the_past_or_NULL
create or replace table t1 (
x int,
row_start bigint unsigned as row start invisible,
row_end bigint unsigned as row end invisible,
period for system_time (row_start, row_end)
) with system versioning engine innodb;
insert into t1 (x) values (1);
delete from t1;
select * from t1 for system_time as of timestamp'1990-1-1 00:00';
x
select * from t1 for system_time as of NULL;
x
drop database test;
create database test;
......@@ -141,5 +141,17 @@ update t1 set x= 4;
commit;
select x, row_start < row_end from t1 for system_time all;
--echo # MDEV-16010 Too many rows with AS OF point_in_the_past_or_NULL
create or replace table t1 (
x int,
row_start bigint unsigned as row start invisible,
row_end bigint unsigned as row end invisible,
period for system_time (row_start, row_end)
) with system versioning engine innodb;
insert into t1 (x) values (1);
delete from t1;
select * from t1 for system_time as of timestamp'1990-1-1 00:00';
select * from t1 for system_time as of NULL;
drop database test;
create database test;
......@@ -8739,6 +8739,12 @@ bool TR_table::query_sees(bool &result, ulonglong trx_id1, ulonglong trx_id0,
return false;
}
if (trx_id0 == ULONGLONG_MAX || trx_id1 == 0)
{
result= false;
return false;
}
if (!commit_id1)
{
if (!query(trx_id1))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment