Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16024

transaction_registry.begin_timestamp is wrong for explicit transactions

    Details

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                midenok Aleksey Midenkov
                Reporter:
                midenok Aleksey Midenkov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: