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

If you have an INVISIBLE VIRTUAL column, SHOW CREATE TABLE doesn't list it as INVISIBLE

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.3, 10.4, 10.3.16
    • Fix Version/s: 10.3.18, 10.4.8
    • Component/s: Virtual Columns
    • Labels:
      None
    • Environment:
      Tested on Windows 10, 64bit.

      Description

      When you have a table that has INVISIBLE VIRTUAL columns, if you run SHOW CREATE TABLE, the INVISIBLE attribute is not present.

      CREATE OR REPLACE TABLE `a` (`i` INT, `v` CHAR(1) GENERATED ALWAYS AS ('a') INVISIBLE);
      INSERT INTO `a` VALUES (1);
      SELECT `i`, `v` FROM `a`;
      SELECT * FROM `a`;
      SHOW CREATE TABLE `a`;
      DROP TABLE `a`;
      

      As a side note, I don't know if it is relevant, but If you run CREATE TABLE `b` LIKE `a` then the INVISIBLE columns appear to be defined correctly, although the SHOW CREATE TABLE is still incorrect.

        Attachments

          Activity

            People

            • Assignee:
              anel Anel Husakovic
              Reporter:
              rmhumphries Robert Humphries
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: