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

virtual columns fail when expression references auto increment column

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

            Transition Time In Source Status Execution Times
            Sergei Golubchik made transition -
            Open Closed
            1h 14m 1
            Sergei Golubchik made transition -
            Closed Stalled
            31m 19s 1
            Ian Gilfillan made transition -
            Stalled Closed
            21h 4m 1

            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.