mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-24536 innodb_idle_flush_pct has no effect
The parameter innodb_idle_flush_pct that was introduced in
MariaDB Server 10.1.2 by MDEV-6932 has no effect ever since
the InnoDB changes from MySQL 5.7.9 were applied in
commit 2e814d4702
.
Let us declare the parameter as deprecated and having no effect.
This commit is contained in:
@@ -24,6 +24,8 @@ select * from information_schema.session_variables where variable_name='innodb_i
|
|||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
INNODB_IDLE_FLUSH_PCT 100
|
INNODB_IDLE_FLUSH_PCT 100
|
||||||
set global innodb_idle_flush_pct=10;
|
set global innodb_idle_flush_pct=10;
|
||||||
|
Warnings:
|
||||||
|
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||||
select @@global.innodb_idle_flush_pct;
|
select @@global.innodb_idle_flush_pct;
|
||||||
@@global.innodb_idle_flush_pct
|
@@global.innodb_idle_flush_pct
|
||||||
10
|
10
|
||||||
@@ -44,6 +46,7 @@ ERROR 42000: Incorrect argument type to variable 'innodb_idle_flush_pct'
|
|||||||
set global innodb_idle_flush_pct=-7;
|
set global innodb_idle_flush_pct=-7;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1292 Truncated incorrect innodb_idle_flush_pct value: '-7'
|
Warning 1292 Truncated incorrect innodb_idle_flush_pct value: '-7'
|
||||||
|
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||||
select @@global.innodb_idle_flush_pct;
|
select @@global.innodb_idle_flush_pct;
|
||||||
@@global.innodb_idle_flush_pct
|
@@global.innodb_idle_flush_pct
|
||||||
0
|
0
|
||||||
@@ -53,6 +56,7 @@ INNODB_IDLE_FLUSH_PCT 0
|
|||||||
set global innodb_idle_flush_pct=106;
|
set global innodb_idle_flush_pct=106;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1292 Truncated incorrect innodb_idle_flush_pct value: '106'
|
Warning 1292 Truncated incorrect innodb_idle_flush_pct value: '106'
|
||||||
|
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||||
select @@global.innodb_idle_flush_pct;
|
select @@global.innodb_idle_flush_pct;
|
||||||
@@global.innodb_idle_flush_pct
|
@@global.innodb_idle_flush_pct
|
||||||
100
|
100
|
||||||
@@ -60,18 +64,26 @@ select * from information_schema.global_variables where variable_name='innodb_id
|
|||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
INNODB_IDLE_FLUSH_PCT 100
|
INNODB_IDLE_FLUSH_PCT 100
|
||||||
set global innodb_idle_flush_pct=0;
|
set global innodb_idle_flush_pct=0;
|
||||||
|
Warnings:
|
||||||
|
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||||
select @@global.innodb_idle_flush_pct;
|
select @@global.innodb_idle_flush_pct;
|
||||||
@@global.innodb_idle_flush_pct
|
@@global.innodb_idle_flush_pct
|
||||||
0
|
0
|
||||||
set global innodb_idle_flush_pct=100;
|
set global innodb_idle_flush_pct=100;
|
||||||
|
Warnings:
|
||||||
|
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||||
select @@global.innodb_idle_flush_pct;
|
select @@global.innodb_idle_flush_pct;
|
||||||
@@global.innodb_idle_flush_pct
|
@@global.innodb_idle_flush_pct
|
||||||
100
|
100
|
||||||
set global innodb_idle_flush_pct=DEFAULT;
|
set global innodb_idle_flush_pct=DEFAULT;
|
||||||
|
Warnings:
|
||||||
|
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||||
select @@global.innodb_idle_flush_pct;
|
select @@global.innodb_idle_flush_pct;
|
||||||
@@global.innodb_idle_flush_pct
|
@@global.innodb_idle_flush_pct
|
||||||
100
|
100
|
||||||
SET @@global.innodb_idle_flush_pct = @start_global_value;
|
SET @@global.innodb_idle_flush_pct = @start_global_value;
|
||||||
|
Warnings:
|
||||||
|
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||||
SELECT @@global.innodb_idle_flush_pct;
|
SELECT @@global.innodb_idle_flush_pct;
|
||||||
@@global.innodb_idle_flush_pct
|
@@global.innodb_idle_flush_pct
|
||||||
100
|
100
|
||||||
|
@@ -331,7 +331,7 @@
|
|||||||
VARIABLE_SCOPE GLOBAL
|
VARIABLE_SCOPE GLOBAL
|
||||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||||
+VARIABLE_TYPE INT UNSIGNED
|
+VARIABLE_TYPE INT UNSIGNED
|
||||||
VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so.
|
VARIABLE_COMMENT DEPRECATED. This setting has no effect.
|
||||||
NUMERIC_MIN_VALUE 0
|
NUMERIC_MIN_VALUE 0
|
||||||
NUMERIC_MAX_VALUE 100
|
NUMERIC_MAX_VALUE 100
|
||||||
@@ -1306,22 +1306,22 @@
|
@@ -1306,22 +1306,22 @@
|
||||||
|
@@ -1283,7 +1283,7 @@ SESSION_VALUE NULL
|
|||||||
DEFAULT_VALUE 100
|
DEFAULT_VALUE 100
|
||||||
VARIABLE_SCOPE GLOBAL
|
VARIABLE_SCOPE GLOBAL
|
||||||
VARIABLE_TYPE BIGINT UNSIGNED
|
VARIABLE_TYPE BIGINT UNSIGNED
|
||||||
VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so.
|
VARIABLE_COMMENT DEPRECATED. This setting has no effect.
|
||||||
NUMERIC_MIN_VALUE 0
|
NUMERIC_MIN_VALUE 0
|
||||||
NUMERIC_MAX_VALUE 100
|
NUMERIC_MAX_VALUE 100
|
||||||
NUMERIC_BLOCK_SIZE 0
|
NUMERIC_BLOCK_SIZE 0
|
||||||
|
@@ -4,7 +4,7 @@ Copyright (c) 2000, 2020, Oracle and/or its affiliates. All Rights Reserved.
|
|||||||
Copyright (c) 2008, 2009 Google Inc.
|
Copyright (c) 2008, 2009 Google Inc.
|
||||||
Copyright (c) 2009, Percona Inc.
|
Copyright (c) 2009, Percona Inc.
|
||||||
Copyright (c) 2012, Facebook Inc.
|
Copyright (c) 2012, Facebook Inc.
|
||||||
Copyright (c) 2013, 2020, MariaDB Corporation.
|
Copyright (c) 2013, 2021, MariaDB Corporation.
|
||||||
|
|
||||||
Portions of this file contain modifications contributed and copyrighted by
|
Portions of this file contain modifications contributed and copyrighted by
|
||||||
Google, Inc. Those modifications are gratefully acknowledged and are described
|
Google, Inc. Those modifications are gratefully acknowledged and are described
|
||||||
@@ -3611,7 +3611,12 @@ static const char* deprecated_mtflush_threads
|
|||||||
" and the parameter will be removed in MariaDB 10.3."
|
" and the parameter will be removed in MariaDB 10.3."
|
||||||
" Use innodb-page-cleaners instead. ";
|
" Use innodb-page-cleaners instead. ";
|
||||||
|
|
||||||
|
/** Deprecation message about innodb_idle_flush_pct */
|
||||||
|
static const char* deprecated_idle_flush_pct
|
||||||
|
= "innodb_idle_flush_pct is DEPRECATED and has no effect.";
|
||||||
|
|
||||||
static my_bool innodb_instrument_semaphores;
|
static my_bool innodb_instrument_semaphores;
|
||||||
|
static ulong innodb_idle_flush_pct;
|
||||||
|
|
||||||
/** If applicable, emit a message that log checksums cannot be disabled.
|
/** If applicable, emit a message that log checksums cannot be disabled.
|
||||||
@param[in,out] thd client session, or NULL if at startup
|
@param[in,out] thd client session, or NULL if at startup
|
||||||
@@ -4232,6 +4237,10 @@ innobase_change_buffering_inited_ok:
|
|||||||
" It will be removed in MariaDB 10.3.";
|
" It will be removed in MariaDB 10.3.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (innodb_idle_flush_pct != 100) {
|
||||||
|
ib::warn() << deprecated_idle_flush_pct;
|
||||||
|
}
|
||||||
|
|
||||||
srv_use_atomic_writes
|
srv_use_atomic_writes
|
||||||
= innobase_use_atomic_writes && my_may_have_atomic_write;
|
= innobase_use_atomic_writes && my_may_have_atomic_write;
|
||||||
if (srv_use_atomic_writes && !srv_file_per_table)
|
if (srv_use_atomic_writes && !srv_file_per_table)
|
||||||
@@ -19845,6 +19854,14 @@ innodb_instrument_semaphores_update(
|
|||||||
HA_ERR_WRONG_COMMAND, deprecated_instrument_semaphores);
|
HA_ERR_WRONG_COMMAND, deprecated_instrument_semaphores);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void innodb_idle_flush_pct_update(THD *thd, st_mysql_sys_var *var,
|
||||||
|
void*, const void *save)
|
||||||
|
{
|
||||||
|
innodb_idle_flush_pct = *static_cast<const ulong*>(save);
|
||||||
|
push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||||
|
HA_ERR_WRONG_COMMAND, deprecated_idle_flush_pct);
|
||||||
|
}
|
||||||
|
|
||||||
/* plugin options */
|
/* plugin options */
|
||||||
|
|
||||||
static MYSQL_SYSVAR_ENUM(checksum_algorithm, srv_checksum_algorithm,
|
static MYSQL_SYSVAR_ENUM(checksum_algorithm, srv_checksum_algorithm,
|
||||||
@@ -19928,12 +19945,10 @@ static MYSQL_SYSVAR_ULONG(io_capacity_max, srv_max_io_capacity,
|
|||||||
SRV_MAX_IO_CAPACITY_DUMMY_DEFAULT, 100,
|
SRV_MAX_IO_CAPACITY_DUMMY_DEFAULT, 100,
|
||||||
SRV_MAX_IO_CAPACITY_LIMIT, 0);
|
SRV_MAX_IO_CAPACITY_LIMIT, 0);
|
||||||
|
|
||||||
static MYSQL_SYSVAR_ULONG(idle_flush_pct,
|
static MYSQL_SYSVAR_ULONG(idle_flush_pct, innodb_idle_flush_pct,
|
||||||
srv_idle_flush_pct,
|
|
||||||
PLUGIN_VAR_RQCMDARG,
|
PLUGIN_VAR_RQCMDARG,
|
||||||
"Up to what percentage of dirty pages should be flushed when innodb "
|
"DEPRECATED. This setting has no effect.",
|
||||||
"finds it has spare resources to do so.",
|
NULL, innodb_idle_flush_pct_update, 100, 0, 100, 0);
|
||||||
NULL, NULL, 100, 0, 100, 0);
|
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
#ifdef UNIV_DEBUG
|
||||||
static MYSQL_SYSVAR_BOOL(background_drop_list_empty,
|
static MYSQL_SYSVAR_BOOL(background_drop_list_empty,
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
|
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||||
Copyright (c) 2008, 2009, Google Inc.
|
Copyright (c) 2008, 2009, Google Inc.
|
||||||
Copyright (c) 2009, Percona Inc.
|
Copyright (c) 2009, Percona Inc.
|
||||||
Copyright (c) 2013, 2018, MariaDB Corporation.
|
Copyright (c) 2013, 2021, MariaDB Corporation.
|
||||||
|
|
||||||
Portions of this file contain modifications contributed and copyrighted by
|
Portions of this file contain modifications contributed and copyrighted by
|
||||||
Google, Inc. Those modifications are gratefully acknowledged and are described
|
Google, Inc. Those modifications are gratefully acknowledged and are described
|
||||||
@@ -435,8 +435,6 @@ extern double srv_defragment_fill_factor;
|
|||||||
extern uint srv_defragment_frequency;
|
extern uint srv_defragment_frequency;
|
||||||
extern ulonglong srv_defragment_interval;
|
extern ulonglong srv_defragment_interval;
|
||||||
|
|
||||||
extern ulong srv_idle_flush_pct;
|
|
||||||
|
|
||||||
extern uint srv_change_buffer_max_size;
|
extern uint srv_change_buffer_max_size;
|
||||||
|
|
||||||
/* Number of IO operations per second the server can do */
|
/* Number of IO operations per second the server can do */
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2008, 2009 Google Inc.
|
Copyright (c) 2008, 2009 Google Inc.
|
||||||
Copyright (c) 2009, Percona Inc.
|
Copyright (c) 2009, Percona Inc.
|
||||||
Copyright (c) 2013, 2020, MariaDB Corporation.
|
Copyright (c) 2013, 2021, MariaDB Corporation.
|
||||||
|
|
||||||
Portions of this file contain modifications contributed and copyrighted by
|
Portions of this file contain modifications contributed and copyrighted by
|
||||||
Google, Inc. Those modifications are gratefully acknowledged and are described
|
Google, Inc. Those modifications are gratefully acknowledged and are described
|
||||||
@@ -272,9 +272,6 @@ ulong srv_buf_pool_dump_pct;
|
|||||||
/** Lock table size in bytes */
|
/** Lock table size in bytes */
|
||||||
ulint srv_lock_table_size = ULINT_MAX;
|
ulint srv_lock_table_size = ULINT_MAX;
|
||||||
|
|
||||||
/** innodb_idle_flush_pct */
|
|
||||||
ulong srv_idle_flush_pct;
|
|
||||||
|
|
||||||
/** copy of innodb_read_io_threads */
|
/** copy of innodb_read_io_threads */
|
||||||
ulint srv_n_read_io_threads;
|
ulint srv_n_read_io_threads;
|
||||||
/** copy of innodb_write_io_threads */
|
/** copy of innodb_write_io_threads */
|
||||||
|
Reference in New Issue
Block a user