Commit 1ab3866d authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-11687 innodb_use_fallocate has no effect

The configuration parameter innodb_use_fallocate, which is mapped to
the variable srv_use_posix_fallocate, has no effect in MariaDB 10.2.2
or MariaDB 10.2.3.
Thus the configuration parameter and the variable should be removed.
parent d4342702
select @@global.innodb_use_fallocate;
@@global.innodb_use_fallocate
0
select @@session.innodb_use_fallocate;
ERROR HY000: Variable 'innodb_use_fallocate' is a GLOBAL variable
show global variables like 'innodb_use_fallocate';
Variable_name Value
innodb_use_fallocate OFF
show session variables like 'innodb_use_fallocate';
Variable_name Value
innodb_use_fallocate OFF
select * from information_schema.global_variables where variable_name='innodb_use_fallocate';
VARIABLE_NAME VARIABLE_VALUE
INNODB_USE_FALLOCATE OFF
select * from information_schema.session_variables where variable_name='innodb_use_fallocate';
VARIABLE_NAME VARIABLE_VALUE
INNODB_USE_FALLOCATE OFF
set global innodb_use_fallocate=1;
ERROR HY000: Variable 'innodb_use_fallocate' is a read only variable
set session innodb_use_fallocate=1;
ERROR HY000: Variable 'innodb_use_fallocate' is a read only variable
......@@ -2581,20 +2581,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_FALLOCATE
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Preallocate files fast, using operating system functionality. On POSIX systems, posix_fallocate system call is used.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_MTFLUSH
SESSION_VALUE NULL
GLOBAL_VALUE OFF
......
--source include/have_innodb.inc
# bool readonly
#
# show values;
#
select @@global.innodb_use_fallocate;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_use_fallocate;
show global variables like 'innodb_use_fallocate';
show session variables like 'innodb_use_fallocate';
select * from information_schema.global_variables where variable_name='innodb_use_fallocate';
select * from information_schema.session_variables where variable_name='innodb_use_fallocate';
#
# show that it's read-only
#
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_use_fallocate=1;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set session innodb_use_fallocate=1;
......@@ -250,7 +250,6 @@ values */
static ulong innobase_fast_shutdown = 1;
static my_bool innobase_file_format_check = TRUE;
static my_bool innobase_use_atomic_writes = FALSE;
static my_bool innobase_use_fallocate = TRUE;
static my_bool innobase_use_doublewrite = TRUE;
static my_bool innobase_use_checksums = TRUE;
static my_bool innobase_locks_unsafe_for_binlog = FALSE;
......@@ -4637,9 +4636,6 @@ innobase_init(
data_mysql_default_charset_coll = (ulint) default_charset_info->number;
innobase_commit_concurrency_init_default();
#ifdef HAVE_POSIX_FALLOCATE
srv_use_posix_fallocate = (ibool) innobase_use_fallocate;
#endif
srv_use_atomic_writes = (ibool) innobase_use_atomic_writes;
if (innobase_use_atomic_writes) {
fprintf(stderr, "InnoDB: using atomic writes.\n");
......@@ -4658,13 +4654,6 @@ innobase_init(
srv_file_flush_method_str = (char*)"O_DIRECT";
fprintf(stderr, "InnoDB: using O_DIRECT due to atomic writes.\n");
}
#endif
#ifdef HAVE_POSIX_FALLOCATE
/* Due to a bug in directFS, using atomics needs
* posix_fallocate to extend the file
* pwrite() past end of the file won't work
*/
srv_use_posix_fallocate = TRUE;
#endif
}
......@@ -21957,11 +21946,6 @@ static MYSQL_SYSVAR_BOOL(use_atomic_writes, innobase_use_atomic_writes,
"on Linux only with FusionIO device, and directFS filesystem.",
NULL, NULL, FALSE);
static MYSQL_SYSVAR_BOOL(use_fallocate, innobase_use_fallocate,
PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
"Preallocate files fast, using operating system functionality. On POSIX systems, posix_fallocate system call is used.",
NULL, NULL, FALSE);
static MYSQL_SYSVAR_ULONG(io_capacity, srv_io_capacity,
PLUGIN_VAR_RQCMDARG,
"Number of IOPs the server can do. Tunes the background IO rate",
......@@ -23187,7 +23171,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(data_home_dir),
MYSQL_SYSVAR(doublewrite),
MYSQL_SYSVAR(use_atomic_writes),
MYSQL_SYSVAR(use_fallocate),
MYSQL_SYSVAR(api_enable_binlog),
MYSQL_SYSVAR(api_enable_mdl),
MYSQL_SYSVAR(api_disable_rowlock),
......
......@@ -293,11 +293,6 @@ extern my_bool srv_numa_interleave;
/* Use trim operation */
extern my_bool srv_use_trim;
/* Use posix fallocate */
#ifdef HAVE_POSIX_FALLOCATE
extern my_bool srv_use_posix_fallocate;
#endif
/* Use atomic writes i.e disable doublewrite buffer */
extern my_bool srv_use_atomic_writes;
......
......@@ -190,8 +190,6 @@ my_bool srv_numa_interleave = FALSE;
/* If this flag is TRUE, then we will use fallocate(PUCH_HOLE)
to the pages */
UNIV_INTERN my_bool srv_use_trim = FALSE;
/* If this flag is TRUE, then we will use posix fallocate for file extentsion */
UNIV_INTERN my_bool srv_use_posix_fallocate = FALSE;
/* If this flag is TRUE, then we disable doublewrite buffer */
UNIV_INTERN my_bool srv_use_atomic_writes = FALSE;
/* If this flag IS TRUE, then we use this algorithm for page compressing the pages */
......
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