diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2016-11-07 10:25:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-07 10:25:49 +0200 |
commit | ea24480c4e38019def9950420dc3f4b2635433b2 (patch) | |
tree | b383d91c1c61984a9d96fb12f133ad46de5da10c /storage | |
parent | f5719fcf8cbaf81fcde12dd6261bb0144803c5b1 (diff) | |
parent | bba224dd53105ca65e0b3ca304e95248363bfa24 (diff) | |
download | mariadb-git-ea24480c4e38019def9950420dc3f4b2635433b2.tar.gz |
Merge pull request #255 from rasmushoj/MDEV-9820
MDEV-9820 Added server variable compression_default, which if 1/ON sets compres…
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 8 | ||||
-rw-r--r-- | storage/xtradb/handler/ha_innodb.cc | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 08da8c36cd8..164287b5676 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -684,6 +684,11 @@ srv_mbr_debug(const byte* data) static void innodb_remember_check_sysvar_funcs(); mysql_var_check_func check_sysvar_enum; +// should page compression be used by default for new tables +static MYSQL_THDVAR_BOOL(compression_default, PLUGIN_VAR_OPCMDARG, + "Is compression the default for new tables", + NULL, NULL, FALSE); + static MYSQL_THDVAR_UINT(default_encryption_key_id, PLUGIN_VAR_RQCMDARG, "Default encryption key id used for table encryption.", NULL, NULL, @@ -701,7 +706,7 @@ ha_create_table_option innodb_table_option_list[]= { /* With this option user can enable page compression feature for the table */ - HA_TOPTION_BOOL("PAGE_COMPRESSED", page_compressed, 0), + HA_TOPTION_SYSVAR("PAGE_COMPRESSED", page_compressed, compression_default), /* With this option user can set zip compression level for page compression for this table*/ HA_TOPTION_NUMBER("PAGE_COMPRESSION_LEVEL", page_compression_level, 0, 1, 9, 1), @@ -23806,6 +23811,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(fatal_semaphore_wait_threshold), /* Table page compression feature */ MYSQL_SYSVAR(use_trim), + MYSQL_SYSVAR(compression_default), MYSQL_SYSVAR(compression_algorithm), MYSQL_SYSVAR(mtflush_threads), MYSQL_SYSVAR(use_mtflush), diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 900d520d242..bd02e97b739 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -620,6 +620,11 @@ ib_cb_t innodb_api_cb[] = { static void innodb_remember_check_sysvar_funcs(); mysql_var_check_func check_sysvar_enum; +// should page compression be used by default for new tables +static MYSQL_THDVAR_BOOL(compression_default, PLUGIN_VAR_OPCMDARG, + "Is compression the default for new tables", + NULL, NULL, FALSE); + static MYSQL_THDVAR_UINT(default_encryption_key_id, PLUGIN_VAR_RQCMDARG, "Default encryption key id used for table encryption.", NULL, NULL, @@ -637,7 +642,7 @@ ha_create_table_option innodb_table_option_list[]= { /* With this option user can enable page compression feature for the table */ - HA_TOPTION_BOOL("PAGE_COMPRESSED", page_compressed, 0), + HA_TOPTION_BOOL("PAGE_COMPRESSED", page_compressed, compression_default), /* With this option user can set zip compression level for page compression for this table*/ HA_TOPTION_NUMBER("PAGE_COMPRESSION_LEVEL", page_compression_level, 0, 1, 9, 1), @@ -21433,6 +21438,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(fatal_semaphore_wait_threshold), /* Table page compression feature */ MYSQL_SYSVAR(use_trim), + MYSQL_SYSVAR(compression_default), MYSQL_SYSVAR(compression_algorithm), MYSQL_SYSVAR(mtflush_threads), MYSQL_SYSVAR(use_mtflush), |