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

innodb.full_crc32_import fails due to the use of optional compression algorithm

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4(EOL)
    • 10.4.12, 10.5.1
    • Tests
    • None

    Description

      10.4 9a621200

      innodb.full_crc32_import 'innodb'        [ fail ]
              Test ended at 2019-12-11 17:13:08
       
      CURRENT_TEST: innodb.full_crc32_import
      mysqltest: At line 142: query 'SET GLOBAL innodb_compression_algorithm=2' failed: 1231: Variable 'innodb_compression_algorithm' can't be set to the value of '2'
      

      The minimal fix would be

      diff --git a/mysql-test/suite/innodb/t/full_crc32_import.test b/mysql-test/suite/innodb/t/full_crc32_import.test
      index caa6329d69b..0503b40b6bd 100644
      --- a/mysql-test/suite/innodb/t/full_crc32_import.test
      +++ b/mysql-test/suite/innodb/t/full_crc32_import.test
      @@ -139,6 +139,7 @@ CHECK TABLE t1;
       DROP TABLE t1;
       
       SET @save_algo = @@GLOBAL.innodb_compression_algorithm;
      +--error 0,1231
       SET GLOBAL innodb_compression_algorithm=2;
       CREATE TABLE t1(a SERIAL) PAGE_COMPRESSED=1 ENGINE=InnoDB;
       INSERT INTO t1 VALUES(1);
      

      But while we are at it, I recommend

      diff --git a/mysql-test/suite/innodb/t/full_crc32_import.test b/mysql-test/suite/innodb/t/full_crc32_import.test
      index caa6329d69b..2c11a2423e6 100644
      --- a/mysql-test/suite/innodb/t/full_crc32_import.test
      +++ b/mysql-test/suite/innodb/t/full_crc32_import.test
      @@ -139,6 +139,7 @@ CHECK TABLE t1;
       DROP TABLE t1;
       
       SET @save_algo = @@GLOBAL.innodb_compression_algorithm;
      +--error 0,ER_WRONG_VALUE_FOR_VAR
       SET GLOBAL innodb_compression_algorithm=2;
       CREATE TABLE t1(a SERIAL) PAGE_COMPRESSED=1 ENGINE=InnoDB;
       INSERT INTO t1 VALUES(1);
      @@ -170,7 +171,7 @@ INSERT INTO t1 VALUES(2);
       SELECT * FROM t1;
       
       
      ---error 0,1231
      +--error 0,ER_WRONG_VALUE_FOR_VAR
       SET GLOBAL innodb_compression_algorithm=3;
       FLUSH TABLE t1 FOR EXPORT;
       --echo # List before copying files
      

      Attachments

        Activity

          diff --git a/mysql-test/suite/innodb/t/full_crc32_import.test b/mysql-test/suite/innodb/t/full_crc32_import.test
          index caa6329d69b..8ffa93d437c 100644
          --- a/mysql-test/suite/innodb/t/full_crc32_import.test
          +++ b/mysql-test/suite/innodb/t/full_crc32_import.test
          @@ -139,6 +139,7 @@ CHECK TABLE t1;
           DROP TABLE t1;
           
           SET @save_algo = @@GLOBAL.innodb_compression_algorithm;
          +--error 0, ER_WRONG_VALUE_FOR_VAR
           SET GLOBAL innodb_compression_algorithm=2;
           CREATE TABLE t1(a SERIAL) PAGE_COMPRESSED=1 ENGINE=InnoDB;
           INSERT INTO t1 VALUES(1);
          @@ -170,7 +171,7 @@ INSERT INTO t1 VALUES(2);
           SELECT * FROM t1;
           
           
          ---error 0,1231
          +--error 0,ER_WRONG_VALUE_FOR_VAR
           SET GLOBAL innodb_compression_algorithm=3;
           FLUSH TABLE t1 FOR EXPORT;
           --echo # List before copying files
          
          

          thiru Thirunarayanan Balathandayuthapani added a comment - diff --git a/mysql-test/suite/innodb/t/full_crc32_import.test b/mysql-test/suite/innodb/t/full_crc32_import.test index caa6329d69b..8ffa93d437c 100644 --- a/mysql-test/suite/innodb/t/full_crc32_import.test +++ b/mysql-test/suite/innodb/t/full_crc32_import.test @@ -139,6 +139,7 @@ CHECK TABLE t1; DROP TABLE t1;   SET @save_algo = @@GLOBAL.innodb_compression_algorithm; +--error 0, ER_WRONG_VALUE_FOR_VAR SET GLOBAL innodb_compression_algorithm=2; CREATE TABLE t1(a SERIAL) PAGE_COMPRESSED=1 ENGINE=InnoDB; INSERT INTO t1 VALUES(1); @@ -170,7 +171,7 @@ INSERT INTO t1 VALUES(2); SELECT * FROM t1;     ---error 0,1231 +--error 0,ER_WRONG_VALUE_FOR_VAR SET GLOBAL innodb_compression_algorithm=3; FLUSH TABLE t1 FOR EXPORT; --echo # List before copying files

          serg, can you please review this.

          I think that the build-time choice of allowed innodb_compression_algorithm constitutes a part of the file format.

          If our documented intention is that only innodb_compression_algorithm IN ('none','zlib') are guaranteed to be implemented and supported in all future versions, then the fix that was suggested by elenst is valid.

          However, if we intend to support more algorithms (2=lz4, 3=lzo, 4=lzma, 5=bzip2, 6=snappy), then the test should indeed keep failing and the build scripts should be fixed.

          My personal opinion is that it was a mistake to introduce so many options related to page_compressed. Especially bzip2 seems to be a bad match for InnoDB, because it is tuned for much larger input than the innodb_page_size. Hence, I would recommend to only promise future compatibility for innodb_compression_algorithm=zlib and to implement the suggested fix to the test case.

          marko Marko Mäkelä added a comment - serg , can you please review this. I think that the build-time choice of allowed innodb_compression_algorithm constitutes a part of the file format. If our documented intention is that only innodb_compression_algorithm IN ('none','zlib') are guaranteed to be implemented and supported in all future versions, then the fix that was suggested by elenst is valid. However, if we intend to support more algorithms (2=lz4, 3=lzo, 4=lzma, 5=bzip2, 6=snappy), then the test should indeed keep failing and the build scripts should be fixed. My personal opinion is that it was a mistake to introduce so many options related to page_compressed . Especially bzip2 seems to be a bad match for InnoDB, because it is tuned for much larger input than the innodb_page_size . Hence, I would recommend to only promise future compatibility for innodb_compression_algorithm=zlib and to implement the suggested fix to the test case.

          I pushed the fix that was suggested by elenst. This relaxes the test, treating the compression algorithms as optional.

          To ensure file format compatibility, we might want to ensure that a wider selection of compressed page formats will be available at build time.

          marko Marko Mäkelä added a comment - I pushed the fix that was suggested by elenst . This relaxes the test, treating the compression algorithms as optional. To ensure file format compatibility, we might want to ensure that a wider selection of compressed page formats will be available at build time.

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.