diff options
author | Jan Lindström <jan.lindstrom@skysql.com> | 2015-02-19 17:42:18 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@skysql.com> | 2015-02-19 17:42:18 +0200 |
commit | 9152b83973419ea034bb6040703c18b3ee87e084 (patch) | |
tree | 63a491777c10b1bc4afb3141838676d85df704f3 /mysql-test | |
parent | bab1c686a464afab46caef7639086acefa43b63c (diff) | |
download | mariadb-git-9152b83973419ea034bb6040703c18b3ee87e084.tar.gz |
Merged from 10.0-FusionIO:
Added support for compression method snappy for page compression.
Diffstat (limited to 'mysql-test')
4 files changed, 696 insertions, 1 deletions
diff --git a/mysql-test/include/have_innodb_snappy.inc b/mysql-test/include/have_innodb_snappy.inc new file mode 100644 index 00000000000..c4dca4c19ee --- /dev/null +++ b/mysql-test/include/have_innodb_snappy.inc @@ -0,0 +1,4 @@ +if (! `SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_have_snappy' AND variable_value = 'ON'`) +{ + --skip Test requires InnoDB compiled with libsnappy +} diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result b/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result new file mode 100644 index 00000000000..1709d8e9d2b --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result @@ -0,0 +1,438 @@ +call mtr.add_suppression("InnoDB: Warning: Compression failed for space*"); +set global innodb_file_format = `barracuda`; +set global innodb_file_per_table = on; +set global innodb_compression_algorithm = 6; +create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8; +show warnings; +Level Code Message +create table innodb_normal (c1 int, b char(20)) engine=innodb; +show warnings; +Level Code Message +create table innodb_page_compressed1 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=1; +show warnings; +Level Code Message +show create table innodb_page_compressed1; +Table Create Table +innodb_page_compressed1 CREATE TABLE `innodb_page_compressed1` ( + `c1` int(11) DEFAULT NULL, + `b` char(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=1 +create table innodb_page_compressed2 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=2; +show warnings; +Level Code Message +show create table innodb_page_compressed2; +Table Create Table +innodb_page_compressed2 CREATE TABLE `innodb_page_compressed2` ( + `c1` int(11) DEFAULT NULL, + `b` char(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=2 +create table innodb_page_compressed3 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=3; +show warnings; +Level Code Message +show create table innodb_page_compressed3; +Table Create Table +innodb_page_compressed3 CREATE TABLE `innodb_page_compressed3` ( + `c1` int(11) DEFAULT NULL, + `b` char(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=3 +create table innodb_page_compressed4 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=4; +show warnings; +Level Code Message +show create table innodb_page_compressed4; +Table Create Table +innodb_page_compressed4 CREATE TABLE `innodb_page_compressed4` ( + `c1` int(11) DEFAULT NULL, + `b` char(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=4 +create table innodb_page_compressed5 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=5; +show warnings; +Level Code Message +show create table innodb_page_compressed5; +Table Create Table +innodb_page_compressed5 CREATE TABLE `innodb_page_compressed5` ( + `c1` int(11) DEFAULT NULL, + `b` char(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=5 +create table innodb_page_compressed6 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=6; +show warnings; +Level Code Message +show create table innodb_page_compressed6; +Table Create Table +innodb_page_compressed6 CREATE TABLE `innodb_page_compressed6` ( + `c1` int(11) DEFAULT NULL, + `b` char(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=6 +create table innodb_page_compressed7 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=7; +show warnings; +Level Code Message +show create table innodb_page_compressed7; +Table Create Table +innodb_page_compressed7 CREATE TABLE `innodb_page_compressed7` ( + `c1` int(11) DEFAULT NULL, + `b` char(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=7 +create table innodb_page_compressed8 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=8; +show warnings; +Level Code Message +show create table innodb_page_compressed8; +Table Create Table +innodb_page_compressed8 CREATE TABLE `innodb_page_compressed8` ( + `c1` int(11) DEFAULT NULL, + `b` char(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=8 +create table innodb_page_compressed9 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=9; +show warnings; +Level Code Message +show create table innodb_page_compressed9; +Table Create Table +innodb_page_compressed9 CREATE TABLE `innodb_page_compressed9` ( + `c1` int(11) DEFAULT NULL, + `b` char(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=9 +create procedure innodb_insert_proc (repeat_count int) +begin +declare current_num int; +set current_num = 0; +while current_num < repeat_count do +insert into innodb_normal values(current_num,'testing..'); +set current_num = current_num + 1; +end while; +end// +commit; +set autocommit=0; +call innodb_insert_proc(5000); +commit; +set autocommit=1; +select count(*) from innodb_normal; +count(*) +5000 +insert into innodb_compressed select * from innodb_normal; +insert into innodb_page_compressed1 select * from innodb_normal; +insert into innodb_page_compressed2 select * from innodb_normal; +insert into innodb_page_compressed3 select * from innodb_normal; +insert into innodb_page_compressed4 select * from innodb_normal; +insert into innodb_page_compressed5 select * from innodb_normal; +insert into innodb_page_compressed6 select * from innodb_normal; +insert into innodb_page_compressed7 select * from innodb_normal; +insert into innodb_page_compressed8 select * from innodb_normal; +insert into innodb_page_compressed9 select * from innodb_normal; +commit; +select count(*) from innodb_compressed; +count(*) +5000 +select count(*) from innodb_page_compressed1; +count(*) +5000 +select count(*) from innodb_page_compressed1 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed2 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed3 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed4 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed5 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed6 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed7 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed8 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed9 where c1 < 500000; +count(*) +5000 +alter table innodb_normal page_compressed=1 page_compression_level=8; +show warnings; +Level Code Message +show create table innodb_normal; +Table Create Table +innodb_normal CREATE TABLE `innodb_normal` ( + `c1` int(11) DEFAULT NULL, + `b` char(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=8 +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; +show warnings; +Level Code Message +show create table innodb_compressed; +Table Create Table +innodb_compressed CREATE TABLE `innodb_compressed` ( + `c1` int(11) DEFAULT NULL, + `b` char(20) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=8 +update innodb_page_compressed1 set c1 = c1 + 1; +update innodb_page_compressed2 set c1 = c1 + 1; +update innodb_page_compressed3 set c1 = c1 + 1; +update innodb_page_compressed4 set c1 = c1 + 1; +update innodb_page_compressed5 set c1 = c1 + 1; +update innodb_page_compressed6 set c1 = c1 + 1; +update innodb_page_compressed7 set c1 = c1 + 1; +update innodb_page_compressed8 set c1 = c1 + 1; +update innodb_page_compressed9 set c1 = c1 + 1; +select count(*) from innodb_compressed; +count(*) +5000 +select count(*) from innodb_page_compressed1; +count(*) +5000 +select count(*) from innodb_page_compressed1 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed2 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed3 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed4 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed5 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed6 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed7 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed8 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed9 where c1 < 500000; +count(*) +5000 +update innodb_page_compressed1 set c1 = c1 + 1; +update innodb_page_compressed2 set c1 = c1 + 1; +update innodb_page_compressed3 set c1 = c1 + 1; +update innodb_page_compressed4 set c1 = c1 + 1; +update innodb_page_compressed5 set c1 = c1 + 1; +update innodb_page_compressed6 set c1 = c1 + 1; +update innodb_page_compressed7 set c1 = c1 + 1; +update innodb_page_compressed8 set c1 = c1 + 1; +update innodb_page_compressed9 set c1 = c1 + 1; +select count(*) from innodb_compressed; +count(*) +5000 +select count(*) from innodb_page_compressed1; +count(*) +5000 +select count(*) from innodb_page_compressed1 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed2 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed3 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed4 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed5 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed6 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed7 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed8 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed9 where c1 < 500000; +count(*) +5000 +set global innodb_compression_algorithm = 1; +update innodb_page_compressed1 set c1 = c1 + 1; +update innodb_page_compressed2 set c1 = c1 + 1; +update innodb_page_compressed3 set c1 = c1 + 1; +update innodb_page_compressed4 set c1 = c1 + 1; +update innodb_page_compressed5 set c1 = c1 + 1; +update innodb_page_compressed6 set c1 = c1 + 1; +update innodb_page_compressed7 set c1 = c1 + 1; +update innodb_page_compressed8 set c1 = c1 + 1; +update innodb_page_compressed9 set c1 = c1 + 1; +commit; +select count(*) from innodb_compressed; +count(*) +5000 +select count(*) from innodb_page_compressed1; +count(*) +5000 +select count(*) from innodb_page_compressed1 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed2 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed3 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed4 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed5 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed6 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed7 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed8 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed9 where c1 < 500000; +count(*) +5000 +update innodb_page_compressed1 set c1 = c1 + 1; +update innodb_page_compressed2 set c1 = c1 + 1; +update innodb_page_compressed3 set c1 = c1 + 1; +update innodb_page_compressed4 set c1 = c1 + 1; +update innodb_page_compressed5 set c1 = c1 + 1; +update innodb_page_compressed6 set c1 = c1 + 1; +update innodb_page_compressed7 set c1 = c1 + 1; +update innodb_page_compressed8 set c1 = c1 + 1; +update innodb_page_compressed9 set c1 = c1 + 1; +select count(*) from innodb_compressed; +count(*) +5000 +select count(*) from innodb_page_compressed1; +count(*) +5000 +select count(*) from innodb_page_compressed1 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed2 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed3 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed4 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed5 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed6 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed7 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed8 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed9 where c1 < 500000; +count(*) +5000 +set global innodb_compression_algorithm = 0; +update innodb_page_compressed1 set c1 = c1 + 1; +update innodb_page_compressed2 set c1 = c1 + 1; +update innodb_page_compressed3 set c1 = c1 + 1; +update innodb_page_compressed4 set c1 = c1 + 1; +update innodb_page_compressed5 set c1 = c1 + 1; +update innodb_page_compressed6 set c1 = c1 + 1; +update innodb_page_compressed7 set c1 = c1 + 1; +update innodb_page_compressed8 set c1 = c1 + 1; +update innodb_page_compressed9 set c1 = c1 + 1; +commit; +select count(*) from innodb_compressed; +count(*) +5000 +select count(*) from innodb_page_compressed1; +count(*) +5000 +select count(*) from innodb_page_compressed1 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed2 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed3 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed4 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed5 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed6 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed7 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed8 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed9 where c1 < 500000; +count(*) +5000 +update innodb_page_compressed1 set c1 = c1 + 1; +update innodb_page_compressed2 set c1 = c1 + 1; +update innodb_page_compressed3 set c1 = c1 + 1; +update innodb_page_compressed4 set c1 = c1 + 1; +update innodb_page_compressed5 set c1 = c1 + 1; +update innodb_page_compressed6 set c1 = c1 + 1; +update innodb_page_compressed7 set c1 = c1 + 1; +update innodb_page_compressed8 set c1 = c1 + 1; +update innodb_page_compressed9 set c1 = c1 + 1; +select count(*) from innodb_compressed; +count(*) +5000 +select count(*) from innodb_page_compressed1; +count(*) +5000 +select count(*) from innodb_page_compressed1 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed2 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed3 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed4 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed5 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed6 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed7 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed8 where c1 < 500000; +count(*) +5000 +select count(*) from innodb_page_compressed9 where c1 < 500000; +count(*) +5000 +drop procedure innodb_insert_proc; +drop table innodb_normal; +drop table innodb_compressed; +drop table innodb_page_compressed1; +drop table innodb_page_compressed2; +drop table innodb_page_compressed3; +drop table innodb_page_compressed4; +drop table innodb_page_compressed5; +drop table innodb_page_compressed6; +drop table innodb_page_compressed7; +drop table innodb_page_compressed8; +drop table innodb_page_compressed9; diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test b/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test new file mode 100644 index 00000000000..8c4980ff479 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test @@ -0,0 +1,253 @@ +-- source include/have_innodb.inc +-- source include/have_innodb_snappy.inc + +call mtr.add_suppression("InnoDB: Warning: Compression failed for space*"); + +--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 + +set global innodb_file_format = `barracuda`; +set global innodb_file_per_table = on; + +# snappy +set global innodb_compression_algorithm = 6; + +create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8; +show warnings; +create table innodb_normal (c1 int, b char(20)) engine=innodb; +show warnings; +create table innodb_page_compressed1 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=1; +show warnings; +show create table innodb_page_compressed1; +create table innodb_page_compressed2 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=2; +show warnings; +show create table innodb_page_compressed2; +create table innodb_page_compressed3 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=3; +show warnings; +show create table innodb_page_compressed3; +create table innodb_page_compressed4 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=4; +show warnings; +show create table innodb_page_compressed4; +create table innodb_page_compressed5 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=5; +show warnings; +show create table innodb_page_compressed5; +create table innodb_page_compressed6 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=6; +show warnings; +show create table innodb_page_compressed6; +create table innodb_page_compressed7 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=7; +show warnings; +show create table innodb_page_compressed7; +create table innodb_page_compressed8 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=8; +show warnings; +show create table innodb_page_compressed8; +create table innodb_page_compressed9 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=9; +show warnings; +show create table innodb_page_compressed9; +delimiter //; +create procedure innodb_insert_proc (repeat_count int) +begin + declare current_num int; + set current_num = 0; + while current_num < repeat_count do + insert into innodb_normal values(current_num,'testing..'); + set current_num = current_num + 1; + end while; +end// +delimiter ;// +commit; + +set autocommit=0; +call innodb_insert_proc(5000); +commit; +set autocommit=1; +select count(*) from innodb_normal; +insert into innodb_compressed select * from innodb_normal; +insert into innodb_page_compressed1 select * from innodb_normal; +insert into innodb_page_compressed2 select * from innodb_normal; +insert into innodb_page_compressed3 select * from innodb_normal; +insert into innodb_page_compressed4 select * from innodb_normal; +insert into innodb_page_compressed5 select * from innodb_normal; +insert into innodb_page_compressed6 select * from innodb_normal; +insert into innodb_page_compressed7 select * from innodb_normal; +insert into innodb_page_compressed8 select * from innodb_normal; +insert into innodb_page_compressed9 select * from innodb_normal; +commit; +select count(*) from innodb_compressed; +select count(*) from innodb_page_compressed1; +select count(*) from innodb_page_compressed1 where c1 < 500000; +select count(*) from innodb_page_compressed2 where c1 < 500000; +select count(*) from innodb_page_compressed3 where c1 < 500000; +select count(*) from innodb_page_compressed4 where c1 < 500000; +select count(*) from innodb_page_compressed5 where c1 < 500000; +select count(*) from innodb_page_compressed6 where c1 < 500000; +select count(*) from innodb_page_compressed7 where c1 < 500000; +select count(*) from innodb_page_compressed8 where c1 < 500000; +select count(*) from innodb_page_compressed9 where c1 < 500000; + +alter table innodb_normal page_compressed=1 page_compression_level=8; +show warnings; +show create table innodb_normal; +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; +show warnings; +show create table innodb_compressed; + +update innodb_page_compressed1 set c1 = c1 + 1; +update innodb_page_compressed2 set c1 = c1 + 1; +update innodb_page_compressed3 set c1 = c1 + 1; +update innodb_page_compressed4 set c1 = c1 + 1; +update innodb_page_compressed5 set c1 = c1 + 1; +update innodb_page_compressed6 set c1 = c1 + 1; +update innodb_page_compressed7 set c1 = c1 + 1; +update innodb_page_compressed8 set c1 = c1 + 1; +update innodb_page_compressed9 set c1 = c1 + 1; +select count(*) from innodb_compressed; +select count(*) from innodb_page_compressed1; +select count(*) from innodb_page_compressed1 where c1 < 500000; +select count(*) from innodb_page_compressed2 where c1 < 500000; +select count(*) from innodb_page_compressed3 where c1 < 500000; +select count(*) from innodb_page_compressed4 where c1 < 500000; +select count(*) from innodb_page_compressed5 where c1 < 500000; +select count(*) from innodb_page_compressed6 where c1 < 500000; +select count(*) from innodb_page_compressed7 where c1 < 500000; +select count(*) from innodb_page_compressed8 where c1 < 500000; +select count(*) from innodb_page_compressed9 where c1 < 500000; + +--source include/restart_mysqld.inc + +update innodb_page_compressed1 set c1 = c1 + 1; +update innodb_page_compressed2 set c1 = c1 + 1; +update innodb_page_compressed3 set c1 = c1 + 1; +update innodb_page_compressed4 set c1 = c1 + 1; +update innodb_page_compressed5 set c1 = c1 + 1; +update innodb_page_compressed6 set c1 = c1 + 1; +update innodb_page_compressed7 set c1 = c1 + 1; +update innodb_page_compressed8 set c1 = c1 + 1; +update innodb_page_compressed9 set c1 = c1 + 1; +select count(*) from innodb_compressed; +select count(*) from innodb_page_compressed1; +select count(*) from innodb_page_compressed1 where c1 < 500000; +select count(*) from innodb_page_compressed2 where c1 < 500000; +select count(*) from innodb_page_compressed3 where c1 < 500000; +select count(*) from innodb_page_compressed4 where c1 < 500000; +select count(*) from innodb_page_compressed5 where c1 < 500000; +select count(*) from innodb_page_compressed6 where c1 < 500000; +select count(*) from innodb_page_compressed7 where c1 < 500000; +select count(*) from innodb_page_compressed8 where c1 < 500000; +select count(*) from innodb_page_compressed9 where c1 < 500000; + +# zlib +set global innodb_compression_algorithm = 1; +update innodb_page_compressed1 set c1 = c1 + 1; +update innodb_page_compressed2 set c1 = c1 + 1; +update innodb_page_compressed3 set c1 = c1 + 1; +update innodb_page_compressed4 set c1 = c1 + 1; +update innodb_page_compressed5 set c1 = c1 + 1; +update innodb_page_compressed6 set c1 = c1 + 1; +update innodb_page_compressed7 set c1 = c1 + 1; +update innodb_page_compressed8 set c1 = c1 + 1; +update innodb_page_compressed9 set c1 = c1 + 1; +commit; +select count(*) from innodb_compressed; +select count(*) from innodb_page_compressed1; +select count(*) from innodb_page_compressed1 where c1 < 500000; +select count(*) from innodb_page_compressed2 where c1 < 500000; +select count(*) from innodb_page_compressed3 where c1 < 500000; +select count(*) from innodb_page_compressed4 where c1 < 500000; +select count(*) from innodb_page_compressed5 where c1 < 500000; +select count(*) from innodb_page_compressed6 where c1 < 500000; +select count(*) from innodb_page_compressed7 where c1 < 500000; +select count(*) from innodb_page_compressed8 where c1 < 500000; +select count(*) from innodb_page_compressed9 where c1 < 500000; + +--source include/restart_mysqld.inc + +update innodb_page_compressed1 set c1 = c1 + 1; +update innodb_page_compressed2 set c1 = c1 + 1; +update innodb_page_compressed3 set c1 = c1 + 1; +update innodb_page_compressed4 set c1 = c1 + 1; +update innodb_page_compressed5 set c1 = c1 + 1; +update innodb_page_compressed6 set c1 = c1 + 1; +update innodb_page_compressed7 set c1 = c1 + 1; +update innodb_page_compressed8 set c1 = c1 + 1; +update innodb_page_compressed9 set c1 = c1 + 1; +select count(*) from innodb_compressed; +select count(*) from innodb_page_compressed1; +select count(*) from innodb_page_compressed1 where c1 < 500000; +select count(*) from innodb_page_compressed2 where c1 < 500000; +select count(*) from innodb_page_compressed3 where c1 < 500000; +select count(*) from innodb_page_compressed4 where c1 < 500000; +select count(*) from innodb_page_compressed5 where c1 < 500000; +select count(*) from innodb_page_compressed6 where c1 < 500000; +select count(*) from innodb_page_compressed7 where c1 < 500000; +select count(*) from innodb_page_compressed8 where c1 < 500000; +select count(*) from innodb_page_compressed9 where c1 < 500000; + +# none +set global innodb_compression_algorithm = 0; +update innodb_page_compressed1 set c1 = c1 + 1; +update innodb_page_compressed2 set c1 = c1 + 1; +update innodb_page_compressed3 set c1 = c1 + 1; +update innodb_page_compressed4 set c1 = c1 + 1; +update innodb_page_compressed5 set c1 = c1 + 1; +update innodb_page_compressed6 set c1 = c1 + 1; +update innodb_page_compressed7 set c1 = c1 + 1; +update innodb_page_compressed8 set c1 = c1 + 1; +update innodb_page_compressed9 set c1 = c1 + 1; +commit; +select count(*) from innodb_compressed; +select count(*) from innodb_page_compressed1; +select count(*) from innodb_page_compressed1 where c1 < 500000; +select count(*) from innodb_page_compressed2 where c1 < 500000; +select count(*) from innodb_page_compressed3 where c1 < 500000; +select count(*) from innodb_page_compressed4 where c1 < 500000; +select count(*) from innodb_page_compressed5 where c1 < 500000; +select count(*) from innodb_page_compressed6 where c1 < 500000; +select count(*) from innodb_page_compressed7 where c1 < 500000; +select count(*) from innodb_page_compressed8 where c1 < 500000; +select count(*) from innodb_page_compressed9 where c1 < 500000; + +--source include/restart_mysqld.inc + +update innodb_page_compressed1 set c1 = c1 + 1; +update innodb_page_compressed2 set c1 = c1 + 1; +update innodb_page_compressed3 set c1 = c1 + 1; +update innodb_page_compressed4 set c1 = c1 + 1; +update innodb_page_compressed5 set c1 = c1 + 1; +update innodb_page_compressed6 set c1 = c1 + 1; +update innodb_page_compressed7 set c1 = c1 + 1; +update innodb_page_compressed8 set c1 = c1 + 1; +update innodb_page_compressed9 set c1 = c1 + 1; +select count(*) from innodb_compressed; +select count(*) from innodb_page_compressed1; +select count(*) from innodb_page_compressed1 where c1 < 500000; +select count(*) from innodb_page_compressed2 where c1 < 500000; +select count(*) from innodb_page_compressed3 where c1 < 500000; +select count(*) from innodb_page_compressed4 where c1 < 500000; +select count(*) from innodb_page_compressed5 where c1 < 500000; +select count(*) from innodb_page_compressed6 where c1 < 500000; +select count(*) from innodb_page_compressed7 where c1 < 500000; +select count(*) from innodb_page_compressed8 where c1 < 500000; +select count(*) from innodb_page_compressed9 where c1 < 500000; + +drop procedure innodb_insert_proc; +drop table innodb_normal; +drop table innodb_compressed; +drop table innodb_page_compressed1; +drop table innodb_page_compressed2; +drop table innodb_page_compressed3; +drop table innodb_page_compressed4; +drop table innodb_page_compressed5; +drop table innodb_page_compressed6; +drop table innodb_page_compressed7; +drop table innodb_page_compressed8; +drop table innodb_page_compressed9; + +# reset system +--disable_query_log +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_query_log diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index 553ca6f4042..b3e974a75f6 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -478,7 +478,7 @@ VARIABLE_COMMENT Compression algorithm used on page compression. One of: none, z NUMERIC_MIN_VALUE NULL NUMERIC_MAX_VALUE NULL NUMERIC_BLOCK_SIZE NULL -ENUM_VALUE_LIST none,zlib,lz4,lzo,lzma,bzip2 +ENUM_VALUE_LIST none,zlib,lz4,lzo,lzma,bzip2,snappy READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME INNODB_COMPRESSION_FAILURE_THRESHOLD_PCT |