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

virtual columns don't work with enum or set as data type

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 5.5.24, 5.3.7, 5.2.12
    • 5.5.27, 5.3.8
    • None
    • None

    Description

      Trying to use an ENUM data type for a persistent virtual column results in an error

      CREATE TABLE table1 (
      a INT not null,
      b char(2) not null,
      c enum("Y","N") as (case when b = "aa" then "Y" else "N" end) persistent
      );

      ERROR 1033 (HY000): Incorrect information in file: './database/table1.frm'

      Changing the datatype results in a successful table creation.

      CREATE TABLE table1 (
      a INT not null,
      b char(2) not null,
      c char(1) as (case when b = "aa" then "Y" else "N" end) persistent
      );

      Query OK, 0 rows affected (0.16 sec)

      Attachments

        Activity

          pprkut Heinz Wiesinger created issue -
          serg Sergei Golubchik made changes -
          Field Original Value New Value
          Assignee Elena Stepanova [ elenst ]
          elenst Elena Stepanova made changes -
          Fix Version/s 5.5.26 [ 11100 ]
          Fix Version/s 5.3.8 [ 10900 ]
          Affects Version/s 5.2.12 [ 10702 ]
          Affects Version/s 5.3.7 [ 10700 ]
          Assignee Elena Stepanova [ elenst ] Igor Babaev [ igor ]
          Summary virtual columns don't work with enum as data type virtual columns don't work with enum or set as data type
          sanja Oleksandr Byelkin made changes -
          Assignee Igor Babaev [ igor ] Oleksandr Byelkin [ sanja ]
          sanja Oleksandr Byelkin made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          sanja Oleksandr Byelkin made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          sanja Oleksandr Byelkin made changes -
          Assignee Oleksandr Byelkin [ sanja ] Igor Babaev [ igor ]
          igor Igor Babaev (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow defaullt [ 12301 ] MariaDB v2 [ 43896 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 43896 ] MariaDB v3 [ 63126 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 63126 ] MariaDB v4 [ 144855 ]

          People

            igor Igor Babaev (Inactive)
            pprkut Heinz Wiesinger
            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.