[MDEV-16024] transaction_registry.begin_timestamp is wrong for explicit transactions Created: 2018-04-25  Updated: 2018-05-12  Resolved: 2018-05-12

Status: Closed
Project: MariaDB Server
Component/s: Versioned Tables
Affects Version/s: 10.3.6
Fix Version/s: 10.3.7

Type: Bug Priority: Major
Reporter: Aleksey Midenkov Assignee: Aleksey Midenkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-15963 mysql.transaction_registry is not doc... Closed

 Description   

Reproduce

create or replace table t1 (
    x int(11) default null,
    row_start bigint(20) unsigned generated always as row start invisible,
    row_end bigint(20) unsigned generated always as row end invisible,
    period for system_time (row_start, row_end)
) engine=innodb with system versioning;
 
begin;
set @ts1= now(6);
select sleep(1);
insert into t1 values (1);
commit;
 
select row_start from t1 into @trx_id;
select trt_begin_ts(@trx_id) <= @ts1;

Result

trt_begin_ts(@trx_id) is time of last executed statement (commit).

Expected

trt_begin_ts(@trx_id) is time of begin statement.


Generated at Thu Feb 08 08:25:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.