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

CREATE TABLE ... LIKE uses current innodb_compression_default instead of the create value

    XMLWordPrintable

Details

    Description

      # Case 1, ALTER TABLE s_import IMPORT TABLESPACE errors out as
      # s_import has PAGE_COMPRESSED=ON when it should be OFF
       
      --source include/have_innodb.inc
      --let $datadir= `select @@datadir`
      SET @@innodb_compression_default= OFF;
      CREATE or replace SEQUENCE s ENGINE=InnoDB;
      SET @@innodb_compression_default= ON;
      CREATE or replace TABLE s_import LIKE s;
       
      show create table s;
      show create table s_import;
       
      ALTER TABLE s_import DISCARD TABLESPACE;
      FLUSH TABLE s FOR EXPORT;
      --copy_file $datadir/test/s.ibd $datadir/test/s_import.ibd
      --copy_file $datadir/test/s.cfg $datadir/test/s_import.cfg
      UNLOCK TABLES;
      ALTER TABLE s_import IMPORT TABLESPACE;
      drop table t1,s_import;
       
      # Case 2, Same issue but with plan InnoDB. It is good to have both test as sequences
      #         are a bit special
      # show create table s_import shows PAGE_COMPRESSED when it should not.
       
      SET innodb_compression_default= OFF;
      CREATE TABLE t1 (a int, b blob) engine=innodb;
      SET innodb_compression_default= ON;
      CREATE TABLE s_import LIKE t1;
       
      show create table t1;
      show create table s_import;
       
      DROP TABLE t1,s_import;
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              monty Michael Widenius
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.