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

Triggers can modify history

    XMLWordPrintable

Details

    Description

      create table t (a int, s timestamp(6) as row start, e timestamp(6) as row end, period for system_time(s,e)) with system versioning;
      insert into t values (1,'2022-01-01','2023-01-01');
      create trigger tr before insert on t for each row set new.s = '2022-01-01', new.e = '2023-01-01';
      insert into t (a) values (1);
      select * from t for system_time all;
       
      # Cleanup
      drop table t;
      

      bb-10.11-MDEV-16546 2b1d32429

      create table t (a int, s timestamp(6) as row start, e timestamp(6) as row end, period for system_time(s,e)) with system versioning;
      create trigger tr before insert on t for each row set new.s = '2022-01-01', new.e = '2023-01-01';
      insert into t (a) values (1);
      select * from t for system_time all;
      a	s	e
      1	2022-01-01 00:00:00.000000	2023-01-01 00:00:00.000000
      drop table t;
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.