Commit c556b9d8 authored by Jan Lindström's avatar Jan Lindström

Changed so that innodb_compress_index pages means that if true also index

pages are compressed if false index pages are not compressed.

Fixed small output error when page_compression_level was incorrectly
given.
parent 67cb55c5
...@@ -9907,7 +9907,7 @@ ha_innobase::check_table_options( ...@@ -9907,7 +9907,7 @@ ha_innobase::check_table_options(
HA_WRONG_CREATE_OPTION, HA_WRONG_CREATE_OPTION,
"InnoDB: invalid PAGE_COMPRESSION_LEVEL = %lu." "InnoDB: invalid PAGE_COMPRESSION_LEVEL = %lu."
" Valid values are [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]", " Valid values are [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]",
create_info->key_block_size); options->page_compression_level);
return "PAGE_COMPRESSION_LEVEL"; return "PAGE_COMPRESSION_LEVEL";
} }
} }
...@@ -16795,8 +16795,8 @@ static MYSQL_SYSVAR_LONG(trim_pct, srv_trim_pct, ...@@ -16795,8 +16795,8 @@ static MYSQL_SYSVAR_LONG(trim_pct, srv_trim_pct,
static MYSQL_SYSVAR_BOOL(compress_index_pages, srv_page_compress_index_pages, static MYSQL_SYSVAR_BOOL(compress_index_pages, srv_page_compress_index_pages,
PLUGIN_VAR_OPCMDARG, PLUGIN_VAR_OPCMDARG,
"Use page compression for only index pages. Default TRUE.", "Use page compression also for index pages. Default FALSE.",
NULL, NULL, TRUE); NULL, NULL, FALSE);
static MYSQL_SYSVAR_BOOL(use_trim, srv_use_trim, static MYSQL_SYSVAR_BOOL(use_trim, srv_use_trim,
PLUGIN_VAR_OPCMDARG, PLUGIN_VAR_OPCMDARG,
......
...@@ -4464,14 +4464,12 @@ os_aio_array_reserve_slot( ...@@ -4464,14 +4464,12 @@ os_aio_array_reserve_slot(
slot->page_compression = page_compression; slot->page_compression = page_compression;
/* If the space is page compressed and this is write operation /* If the space is page compressed and this is write operation
and if either only index pages compression is disabled or and either index compression is enabled or page is not a index
page is index page and only index pages compression is enabled then page then we compress the page */
we compress the page */
if (message1 && if (message1 &&
type == OS_FILE_WRITE && type == OS_FILE_WRITE &&
page_compression && page_compression &&
(srv_page_compress_index_pages == false || (srv_page_compress_index_pages == true || !fil_page_is_index_page(slot->buf))) {
(srv_page_compress_index_pages == true && fil_page_is_index_page(slot->buf)))) {
ulint real_len = len; ulint real_len = len;
byte* tmp = NULL; byte* tmp = NULL;
......
...@@ -148,7 +148,7 @@ UNIV_INTERN my_bool srv_use_native_aio = TRUE; ...@@ -148,7 +148,7 @@ UNIV_INTERN my_bool srv_use_native_aio = TRUE;
/* If this flag is TRUE, then we will use page compression /* If this flag is TRUE, then we will use page compression
only for index pages */ only for index pages */
UNIV_INTERN my_bool srv_page_compress_index_pages = TRUE; UNIV_INTERN my_bool srv_page_compress_index_pages = FALSE;
UNIV_INTERN long srv_trim_pct = 100; UNIV_INTERN long srv_trim_pct = 100;
/* If this flag is TRUE, then we will use fallocate(PUCH_HOLE) /* If this flag is TRUE, then we will use fallocate(PUCH_HOLE)
to the pages */ to the pages */
......
...@@ -10420,7 +10420,7 @@ ha_innobase::check_table_options( ...@@ -10420,7 +10420,7 @@ ha_innobase::check_table_options(
HA_WRONG_CREATE_OPTION, HA_WRONG_CREATE_OPTION,
"InnoDB: invalid PAGE_COMPRESSION_LEVEL = %lu." "InnoDB: invalid PAGE_COMPRESSION_LEVEL = %lu."
" Valid values are [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]", " Valid values are [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]",
create_info->key_block_size); options->page_compression_level);
return "PAGE_COMPRESSION_LEVEL"; return "PAGE_COMPRESSION_LEVEL";
} }
} }
...@@ -17949,8 +17949,8 @@ static MYSQL_SYSVAR_UINT(compression_level, page_zip_level, ...@@ -17949,8 +17949,8 @@ static MYSQL_SYSVAR_UINT(compression_level, page_zip_level,
static MYSQL_SYSVAR_BOOL(compress_index_pages, srv_page_compress_index_pages, static MYSQL_SYSVAR_BOOL(compress_index_pages, srv_page_compress_index_pages,
PLUGIN_VAR_OPCMDARG, PLUGIN_VAR_OPCMDARG,
"Use page compression for only index pages. Default TRUE.", "Use page compression also for index pages. Default FALSE.",
NULL, NULL, TRUE); NULL, NULL, FALSE);
static MYSQL_SYSVAR_BOOL(use_trim, srv_use_trim, static MYSQL_SYSVAR_BOOL(use_trim, srv_use_trim,
PLUGIN_VAR_OPCMDARG, PLUGIN_VAR_OPCMDARG,
......
...@@ -4580,14 +4580,12 @@ os_aio_array_reserve_slot( ...@@ -4580,14 +4580,12 @@ os_aio_array_reserve_slot(
slot->page_compression = page_compression; slot->page_compression = page_compression;
/* If the space is page compressed and this is write operation /* If the space is page compressed and this is write operation
and if either only index pages compression is disabled or and either index compression is enabled or page is not a index
page is index page and only index pages compression is enabled then page then we compress the page */
we compress the page */
if (message1 && if (message1 &&
type == OS_FILE_WRITE && type == OS_FILE_WRITE &&
page_compression && page_compression &&
(srv_page_compress_index_pages == false || (srv_page_compress_index_pages == true || !fil_page_is_index_page(slot->buf))) {
(srv_page_compress_index_pages == true && fil_page_is_index_page(slot->buf)))) {
ulint real_len = len; ulint real_len = len;
byte* tmp = NULL; byte* tmp = NULL;
......
...@@ -163,7 +163,7 @@ UNIV_INTERN my_bool srv_use_native_aio = TRUE; ...@@ -163,7 +163,7 @@ UNIV_INTERN my_bool srv_use_native_aio = TRUE;
/* If this flag is TRUE, then we will use page compression /* If this flag is TRUE, then we will use page compression
only for index pages */ only for index pages */
UNIV_INTERN my_bool srv_page_compress_index_pages = TRUE; UNIV_INTERN my_bool srv_page_compress_index_pages = FALSE;
UNIV_INTERN long srv_trim_pct = 100; UNIV_INTERN long srv_trim_pct = 100;
/* Default compression level if page compression is used and no compression /* Default compression level if page compression is used and no compression
level is set for the table*/ level is set for the table*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment