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

Application-time period tables documentation update create table statement for Adding and Removing Time Periods section

    XMLWordPrintable

Details

    Description

      Doc link:
      https://mariadb.com/kb/en/library/temporal-data-tables/#adding-and-removing-time-periods

      CREATE TABLE test.t2 (
         id INT PRIMARY KEY,
         time_1 TIMESTAMP(6),
         time_2 TIMESTAMP(2)
      );
      

      And then the alter follows resulted with error as:

      MariaDB [test]> ALTER TABLE test.t2 ADD PERIOD FOR time_period(time_1, time_2);
      ERROR 4153 (HY000): Fields of PERIOD FOR `time_period` have different types
      

      So it seems to be the create statement of table should be instead:

      CREATE TABLE test.t2 (
         id INT PRIMARY KEY,
         time_1 TIMESTAMP(6),
         time_2 TIMESTAMP(6)
      );
      

      Attachments

        Activity

          People

            KennethDyer Kenneth Dyer (Inactive)
            shako Shahriyar Rzayev (Inactive)
            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.