[MDEV-21288] innodb.full_crc32_import fails due to the use of optional compression algorithm Created: 2019-12-11  Updated: 2020-01-07  Resolved: 2020-01-07

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.4
Fix Version/s: 10.4.12, 10.5.1

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks

 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



 Comments   
Comment by Thirunarayanan Balathandayuthapani [ 2020-01-06 ]

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

Comment by Marko Mäkelä [ 2020-01-07 ]

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.

Comment by Marko Mäkelä [ 2020-01-07 ]

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.

Generated at Thu Feb 08 09:06:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.