mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Added server variable compression_default, which if 1/ON sets compression on for all new InnoDB/XtraDB tables by default by setting PAGE_COMPRESSED=1
This commit is contained in:
@ -95,6 +95,20 @@ drop table innodb_normal;
|
||||
drop table innodb_compact;
|
||||
drop table innodb_dynamic;
|
||||
|
||||
# MDEV-9820 introducing variable for having page compression turned on by default on InnoDB tables
|
||||
# test that innodb_compression_default works as expected, i.e. if it has a value of 1 (ON) tables are by default created with page_compressed=1;
|
||||
CREATE TABLE no_compression (id INT NOT NULL, name VARCHAR(200)) ENGINE=InnoDB;
|
||||
SET SESSION innodb_compression_default = 1;
|
||||
CREATE TABLE default_compression (id INT NOT NULL, name VARCHAR(200)) ENGINE=InnoDB;
|
||||
CREATE TABLE explicit_no_compression (id INT NOT NULL, name VARCHAR(200)) ENGINE=InnoDB PAGE_COMPRESSED=0;
|
||||
SHOW CREATE TABLE no_compression;
|
||||
SHOW CREATE TABLE default_compression;
|
||||
SHOW CREATE TABLE explicit_no_compression;
|
||||
DROP TABLE no_compression;
|
||||
DROP TABLE default_compression;
|
||||
DROP TABLE explicit_no_compression;
|
||||
SET SESSION innodb_compression_default = 0;
|
||||
|
||||
# reset system
|
||||
--disable_query_log
|
||||
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
|
||||
|
Reference in New Issue
Block a user