mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
MDEV-11838: Innodb-encryption-algorithm default should be != none
Change default to zlib, this has effect only if user has explicitly requested page compression and then user naturally expects that pages are really compressed if they can be compressed.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
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;
|
||||
# t1 compressed expected NOT FOUND
|
||||
NOT FOUND /compressed_text/ in t1.ibd
|
||||
drop table t1;
|
||||
@@ -0,0 +1,51 @@
|
||||
--source include/have_innodb.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
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
--enable_warnings
|
||||
|
||||
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;
|
||||
|
||||
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
|
||||
@@ -497,9 +497,9 @@ READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME INNODB_COMPRESSION_ALGORITHM
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE none
|
||||
GLOBAL_VALUE zlib
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE none
|
||||
DEFAULT_VALUE zlib
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE ENUM
|
||||
VARIABLE_COMMENT Compression algorithm used on page compression. One of: none, zlib, lz4, lzo, lzma, or bzip2
|
||||
|
||||
@@ -19774,7 +19774,7 @@ static MYSQL_SYSVAR_ENUM(compression_algorithm, innodb_compression_algorithm,
|
||||
/* We use here the largest number of supported compression method to
|
||||
enable all those methods that are available. Availability of compression
|
||||
method is verified on innodb_compression_algorithm_validate function. */
|
||||
PAGE_UNCOMPRESSED,
|
||||
PAGE_ZLIB_ALGORITHM,
|
||||
&page_compression_algorithms_typelib);
|
||||
|
||||
static MYSQL_SYSVAR_LONG(mtflush_threads, srv_mtflush_threads,
|
||||
|
||||
@@ -21257,7 +21257,7 @@ static MYSQL_SYSVAR_ENUM(compression_algorithm, innodb_compression_algorithm,
|
||||
/* We use here the largest number of supported compression method to
|
||||
enable all those methods that are available. Availability of compression
|
||||
method is verified on innodb_compression_algorithm_validate function. */
|
||||
PAGE_UNCOMPRESSED,
|
||||
PAGE_ZLIB_ALGORITHM,
|
||||
&page_compression_algorithms_typelib);
|
||||
|
||||
static MYSQL_SYSVAR_LONG(mtflush_threads, srv_mtflush_threads,
|
||||
|
||||
Reference in New Issue
Block a user