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

Cannot create a virtual column with/out system versioning

    XMLWordPrintable

Details

    Description

      It seems impossible to add WITH SYSTEM VERSIONING or WITHOUT SYSTEM VERSIONING clause for a virtual column.

      This works, so the base syntax is correct:

      MariaDB [db]> create or replace table t1 (i int, j int with system versioning);
      Query OK, 0 rows affected (0.22 sec)
       
      MariaDB [db]> create or replace table t1 (i int, j int as(i));
      Query OK, 0 rows affected (0.24 sec)
       
      MariaDB [db]> create or replace table t1 (i int, j int as(i) persistent);
      Query OK, 0 rows affected (0.22 sec)
      

      But none of this works:

      MariaDB [db]> create or replace table t1 (i int, j int with system versioning as(i));
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as(i))' at line 1
      MariaDB [db]> create or replace table t1 (i int, j int as(i) with system versioning);
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'system versioning)' at line 1
      MariaDB [db]> create or replace table t1 (i int, j int with system versioning as(i) persistent);
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as(i) persistent)' at line 1
      MariaDB [db]> create or replace table t1 (i int, j int as(i) with system versioning persistent);
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'system versioning persistent)' at line 1
      MariaDB [db]> create or replace table t1 (i int, j int as(i) persistent with system versioning);
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'system versioning)' at line 1
      

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.