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

LP:607168 - Virtual columns do not work with CREATE ... SELECT

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Virtual columns do not work properly with CREATE ... SELECT and likely all other similar constructs:

      CREATE TABLE t1 (f1 INTEGER, v1 INTEGER AS (f1) VIRTUAL);
      CREATE TABLE t2 AS SELECT v1 FROM t1;

      returns this error

      1054: Unknown column 'f1' in 'virtual column function'

      which is incorrect. My guess is that the server tries to find v1 in t2 instead of t1. It would be interesting what would happen if t2 did have a column named f1.

      Attachments

        Activity

          People

            igor Igor Babaev (Inactive)
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.