Details

    Description

      We are using MariaDB 10.3.

      As per: https://mariadb.com/kb/en/temporal-data-tables/

      Is it possible to allow the user to explicitly update the ROW_START and ROW_END column in the table row, for a table with SYSTEM VERSIONING enabled?

      We sometimes import old data and would like to backfill the data.

      Attachments

        Issue Links

          Activity

            Yes, it is possible, but not as simple as directly updating these values. For example, the following script will create a historical row as created in 1990-01-01 and deleted one year after:

            set @@timestamp=unix_timestamp('1990-01-01 00:00:01');
            insert into tbl values (100,1,2,'some more data');
            set @@timestamp=unix_timestamp('1991-01-01 00:00:01');
            delete from tbl where pk=100;
            

            This can be easily automated with a stored procedure or some external script.

            For this approach to work you need @@secure_timestamp variable to be not set to YES.

            Allowing direct updates of versioning fields is part of MDEV-16029

            serg Sergei Golubchik added a comment - Yes, it is possible, but not as simple as directly updating these values. For example, the following script will create a historical row as created in 1990-01-01 and deleted one year after: set @@ timestamp =unix_timestamp( '1990-01-01 00:00:01' ); insert into tbl values (100,1,2, 'some more data' ); set @@ timestamp =unix_timestamp( '1991-01-01 00:00:01' ); delete from tbl where pk=100; This can be easily automated with a stored procedure or some external script. For this approach to work you need @@secure_timestamp variable to be not set to YES . Allowing direct updates of versioning fields is part of MDEV-16029

            People

              serg Sergei Golubchik
              jchan1982 James Chsn
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.