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

SYSTEM VERSIONING columns not showing as GENERATED

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.3.8
    • Fix Version/s: 10.3.16, 10.4.6
    • Component/s: Versioned Tables
    • Labels:
      None
    • Environment:
      Server version: 10.3.8-MariaDB-1:10.3.8+maria~stretch-log mariadb.org binary distribution

      Description

      1. Create a table
      2. Add SYSTEM VERSIONING as follows per documentation at https://mariadb.com/kb/en/library/system-versioned-tables/

      ALTER TABLE t ADD COLUMN ts TIMESTAMP(6) GENERATED ALWAYS AS ROW START,
                    ADD COLUMN te TIMESTAMP(6) GENERATED ALWAYS AS ROW END,
                    ADD PERIOD FOR SYSTEM_TIME(ts, te),
                    ADD SYSTEM VERSIONING;
      

      3. Execute a SHOW COLUMNS on table.

      MariaDB [test_database]> show columns from t;
      +-------+--------------+------+-----+---------+----------------+
      | Field | Type         | Null | Key | Default | Extra          |
      +-------+--------------+------+-----+---------+----------------+
      | col1  | bigint(20)   | NO   | PRI | NULL    | auto_increment |
      | ts    | timestamp(6) | NO   |     | NULL    |                |
      | te    | timestamp(6) | NO   | PRI | NULL    |                |
      +-------+--------------+------+-----+---------+----------------+
      

      `ts` and `te` should list GENERATED in the Extra field.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              darkain Vincent Milum Jr
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration