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

Replacing index using default non-copying algorithm causes further ER_TABLE_SCHEMA_MISMATCH upon tablespace import

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
    • 10.5, 10.6
    • None

    Description

      --source include/have_innodb.inc
      --let $datadir= `select @@datadir`
       
      CREATE TABLE `t` (
        `pk` int(11) NOT NULL,
        `a` char(32) DEFAULT NULL,
        `b` bigint(20) DEFAULT NULL,
        PRIMARY KEY (`pk`),
        KEY `ind` (`a`(8))
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
       
      CREATE OR REPLACE INDEX ind ON t(b);
       
      FLUSH TABLES t FOR EXPORT;
       
      --copy_file $datadir/test/t.ibd $datadir/test/t.ibd.save
      --copy_file $datadir/test/t.cfg $datadir/test/t.cfg.save
       
      UNLOCK TABLES;
      DROP TABLE t;
       
      CREATE TABLE `t` (
        `pk` int(11) NOT NULL,
        `a` char(32) DEFAULT NULL,
        `b` bigint(20) DEFAULT NULL,
        PRIMARY KEY (`pk`),
        KEY `ind` (`b`)
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
       
      ALTER TABLE t DISCARD TABLESPACE;
       
      --move_file $datadir/test/t.ibd.save $datadir/test/t.ibd
      --move_file $datadir/test/t.cfg.save $datadir/test/t.cfg
       
      ALTER TABLE t IMPORT TABLESPACE;
       
      # Cleanup
      DROP TABLE t;
      

      10.3 efdbb3cf

      mysqltest: At line 35: query 'ALTER TABLE t IMPORT TABLESPACE' failed: 1808: Schema mismatch (Column a max prefix mismatch it's 0 in the table and 8 in the tablespace meta file)
      

      If the test is run with --mysqld=--alter-algorithm=copy, it passes.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.