Skip to content

Commit

Permalink
MDEV-13674: Deprecate innodb_use_mtflush and innodb_mtflush_threads
Browse files Browse the repository at this point in the history
These parameters and associated code is to be removed in 10.3.
Users can use innodb-page-cleaners > 1 instead.
  • Loading branch information
Jan Lindström committed Aug 31, 2017
1 parent aa22981 commit e23de9f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mysql-test/suite/sys_vars/r/sysvars_innodb.result
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Number of multi-threaded flush threads
VARIABLE_COMMENT DEPRECATED. Number of multi-threaded flush threads
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 64
NUMERIC_BLOCK_SIZE 0
Expand Down Expand Up @@ -3037,7 +3037,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use multi-threaded flush. Default FALSE.
VARIABLE_COMMENT DEPRECATED. Use multi-threaded flush. Default FALSE.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
Expand Down
22 changes: 20 additions & 2 deletions storage/innobase/handler/ha_innodb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3751,6 +3751,16 @@ static const char* deprecated_instrument_semaphores
= "Using innodb_instrument_semaphores is deprecated"
" and the parameter will be removed in MariaDB 10.3.";

static const char* deprecated_use_mtflush
= "Using innodb_use_mtflush is deprecated"
" and the parameter will be removed in MariaDB 10.3."
" Use innodb-page-cleaners instead. ";

static const char* deprecated_mtflush_threads
= "Using innodb_mtflush_threads is deprecated"
" and the parameter will be removed in MariaDB 10.3."
" Use innodb-page-cleaners instead. ";

static my_bool innodb_instrument_semaphores;

/** Update log_checksum_algorithm_ptr with a pointer to the function
Expand Down Expand Up @@ -4111,6 +4121,14 @@ innobase_init(
ib::warn() << deprecated_instrument_semaphores;
}

if (srv_use_mtflush) {
ib::warn() << deprecated_use_mtflush;
}

if (srv_use_mtflush && srv_mtflush_threads != MTFLUSH_DEFAULT_WORKER) {
ib::warn() << deprecated_mtflush_threads;
}

/* Validate the file format by animal name */
if (innobase_file_format_name != NULL) {

Expand Down Expand Up @@ -21615,7 +21633,7 @@ static MYSQL_SYSVAR_ENUM(compression_algorithm, innodb_compression_algorithm,

static MYSQL_SYSVAR_LONG(mtflush_threads, srv_mtflush_threads,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Number of multi-threaded flush threads",
"DEPRECATED. Number of multi-threaded flush threads",
NULL, NULL,
MTFLUSH_DEFAULT_WORKER, /* Default setting */
1, /* Minimum setting */
Expand All @@ -21624,7 +21642,7 @@ static MYSQL_SYSVAR_LONG(mtflush_threads, srv_mtflush_threads,

static MYSQL_SYSVAR_BOOL(use_mtflush, srv_use_mtflush,
PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
"Use multi-threaded flush. Default FALSE.",
"DEPRECATED. Use multi-threaded flush. Default FALSE.",
NULL, NULL, FALSE);

static MYSQL_SYSVAR_ULONG(fatal_semaphore_wait_threshold, srv_fatal_semaphore_wait_threshold,
Expand Down

0 comments on commit e23de9f

Please sign in to comment.