mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-12593: InnoDB page compression should use lz4_compress_default if
available lz4.cmake: Check if shared or static lz4 library has LZ4_compress_default function and if it has define HAVE_LZ4_COMPRESS_DEFAULT. fil_compress_page: If HAVE_LZ4_COMPRESS_DEFAULT is defined use LZ4_compress_default function for compression if not use LZ4_compress_limitedOutput function. Introduced a innodb-page-compression.inc file for page compression tests that will also search .ibd file to verify that pages are compressed (i.e. used search string is not found). Modified page compression tests to use this file. Note that snappy method is not included because of MDEV-12615 InnoDB page compression method snappy mostly does not compress pages that will be fixed on different commit.
This commit is contained in:
@ -1,51 +1,10 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
--disable_query_log
|
||||
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
|
||||
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
|
||||
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
|
||||
--enable_query_log
|
||||
call mtr.add_suppression("InnoDB: Compression failed for space [0-9]+ name test/innodb_page_compressed[0-9] len [0-9]+ err 2 write_size [0-9]+.");
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
--enable_warnings
|
||||
# All page compression test use the same
|
||||
--source include/innodb-page-compression.inc
|
||||
|
||||
create table t1 (c1 int not null primary key auto_increment, b char(200)) engine=innodb page_compressed=1;
|
||||
insert into t1 values(NULL,'compressed_text_aaaaaaaaabbbbbbbbbbbbbccccccccccccc');
|
||||
insert into t1(b) select b from t1;
|
||||
insert into t1(b) select b from t1;
|
||||
insert into t1(b) select b from t1;
|
||||
insert into t1(b) select b from t1;
|
||||
insert into t1(b) select b from t1;
|
||||
insert into t1(b) select b from t1;
|
||||
insert into t1(b) select b from t1;
|
||||
insert into t1(b) select b from t1;
|
||||
insert into t1(b) select b from t1;
|
||||
insert into t1(b) select b from t1;
|
||||
insert into t1(b) select b from t1;
|
||||
insert into t1(b) select b from t1;
|
||||
insert into t1(b) select b from t1;
|
||||
-- echo #done
|
||||
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--let $MYSQLD_DATADIR=`select @@datadir`
|
||||
--let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd
|
||||
--let SEARCH_RANGE = 10000000
|
||||
--let SEARCH_PATTERN=compressed_text
|
||||
|
||||
--echo # t1 compressed expected NOT FOUND
|
||||
-- let SEARCH_FILE=$t1_IBD
|
||||
-- source include/search_pattern_in_file.inc
|
||||
|
||||
drop table t1;
|
||||
|
||||
# reset system
|
||||
--disable_query_log
|
||||
--disable_warnings
|
||||
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
|
||||
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
|
||||
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
|
||||
--enable_warnings
|
||||
--enable_query_log
|
||||
|
Reference in New Issue
Block a user