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

Using Bitemporal Table adding WITH SYSTEM VERSIONING to create statement

    XMLWordPrintable

    Details

      Description

      Doc link:
      https://mariadb.com/kb/en/library/temporal-data-tables/#using-bitemporal-tables

      The provided create statement failed as:

      MariaDB [test]> CREATE TABLE test.t3 (
          ->    date_1 DATE,
          ->    date_2 DATE,
          ->    row_start TIMESTAMP(6) AS ROW START INVISIBLE,
          ->    row_end TIMESTAMP(6) AS ROW END INVISIBLE,
          ->    PERIOD FOR application_time(date_1, date_2),
          ->    PERIOD FOR system_time(row_start, row_end));
      ERROR 4125 (HY000): Wrong parameters for `t3`: missing 'WITH SYSTEM VERSIONING'
      

      So it should be replaced by:

      CREATE TABLE test.t3 (
         date_1 DATE,
         date_2 DATE,
         row_start TIMESTAMP(6) AS ROW START INVISIBLE,
         row_end TIMESTAMP(6) AS ROW END INVISIBLE,
         PERIOD FOR application_time(date_1, date_2),
         PERIOD FOR system_time(row_start, row_end)) WITH SYSTEM VERSIONING; 
      

        Attachments

          Activity

            People

            Assignee:
            KennethDyer Kenneth Dyer
            Reporter:
            shako Shahriyar Rzayev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: