Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-30825 innodb_compression_algorithm=0 (none) increments Innodb_nu…
…m_pages_page_compression_error fil_page_compress_low returns 0 for both innodb_compression_algorithm=0 and where there is compression errors. On the two callers to this function, don't increment the compression errors if the algorithm was none. Reviewed by: Marko Mäkelä
- Loading branch information
1 parent
ac15141
commit e467e8d
Showing
3 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
mysql-test/suite/innodb/r/innodb-page_compression_none.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# MDEV-30825 innodb_compression_algorithm=0 (none) increments Innodb_num_pages_page_compression_error | ||
# | ||
SET @save_compression_algorithm=@@GLOBAL.innodb_compression_algorithm; | ||
SET GLOBAL innodb_compression_algorithm=0; | ||
SELECT VARIABLE_VALUE INTO @compress_errors FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_num_pages_page_compression_error'; | ||
CREATE TABLE t (c INT) page_compressed=1 page_compression_level=4 ENGINE=InnoDB; | ||
INSERT INTO t VALUES (1); | ||
FLUSH TABLES t FOR EXPORT; | ||
UNLOCK TABLES; | ||
SELECT VARIABLE_VALUE - @compress_errors AS NUMBER_OF_ERRORS FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_num_pages_page_compression_error'; | ||
NUMBER_OF_ERRORS | ||
0 | ||
DROP TABLE t; | ||
SET GLOBAL innodb_compression_algorithm=@save_compression_algorithm; | ||
# | ||
# End of 10.4 tests | ||
# |
26 changes: 26 additions & 0 deletions
26
mysql-test/suite/innodb/t/innodb-page_compression_none.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
-- source include/innodb_checksum_algorithm.inc | ||
|
||
--echo # | ||
--echo # MDEV-30825 innodb_compression_algorithm=0 (none) increments Innodb_num_pages_page_compression_error | ||
--echo # | ||
|
||
SET @save_compression_algorithm=@@GLOBAL.innodb_compression_algorithm; | ||
SET GLOBAL innodb_compression_algorithm=0; | ||
SELECT VARIABLE_VALUE INTO @compress_errors FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_num_pages_page_compression_error'; | ||
|
||
|
||
CREATE TABLE t (c INT) page_compressed=1 page_compression_level=4 ENGINE=InnoDB; | ||
INSERT INTO t VALUES (1); | ||
|
||
FLUSH TABLES t FOR EXPORT; | ||
UNLOCK TABLES; | ||
|
||
SELECT VARIABLE_VALUE - @compress_errors AS NUMBER_OF_ERRORS FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_num_pages_page_compression_error'; | ||
|
||
DROP TABLE t; | ||
SET GLOBAL innodb_compression_algorithm=@save_compression_algorithm; | ||
|
||
--echo # | ||
--echo # End of 10.4 tests | ||
--echo # | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters