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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 607168

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 607168

              People

              • Assignee:
                igor Igor Babaev
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: