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

virtual columns fail when expression references auto increment column

    XMLWordPrintable

Details

    Description

      The following create statement fails on 10.2.7:

      CREATE TABLE t1 ( id INT NOT NULL AUTO_INCREMENT, v INT AS (id) VIRTUAL, PRIMARY KEY (id) ) ENGINE=InnoDB;
      

      Giving the error:
      #1901 - Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `id`

      The same create statement works fine on 10.1.22

      Attachments

        Issue Links

          Activity

            People

              greenman Ian Gilfillan
              honso Taylor Honsowetz
              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.