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

Replace mysql_version check with frm_version for virtual columns inside InnoDB

    XMLWordPrintable

Details

    Description

      • Start 10.1 server, all defaults are sufficient;
      • create a table as

        CREATE TABLE t1 (f1 INT, f2 INT AS (f1) VIRTUAL) ENGINE=InnoDB;
        

      • shut down the server normally;
      • start 10.3 or 10.4 server on the same datadir;
      • (optionally, it doesn't affect the outcome) run mysql_upgrade;
      • run

        CHECK TABLE t1;
        ALTER TABLE t1 DROP CONSTRAINT IF EXISTS x;
        

        The result is

        Table	Op	Msg_type	Msg_text
        test.t1	check	status	OK
        ERROR 1932 (42S02) at line 2: Table 'test.t1' doesn't exist in engine
        

        The error log gets the warning:

        2019-05-27  1:49:53 9 [Warning] InnoDB: Table test/t1 contains 1 user defined columns in InnoDB, but 2 columns in MariaDB. Please check INFORMATION_SCHEMA.INNODB_SYS_COLUMNS and https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
        

        Further attempts to use the table cause errors in the log:

        2019-05-27  1:50:18 10 [ERROR] InnoDB: Table `test`.`t1` is corrupted. Please drop the table and recreate.
        

      A datadir pre-created as described on 10.1 aaf53ea0 is attached.

      Not reproducible with 10.2, either being the new server or old server in the scenario.

      Attachments

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            elenst Elena Stepanova
            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.