Commit 7b9029b1 authored by Marko Mäkelä's avatar Marko Mäkelä

Remove innodb_use_trim, innodb_instrument_semaphores.

MDEV-11254 deprecated innodb_use_trim in 10.2.

MDEV-12146 deprecated innodb_instrument_semaphores in 10.2.
parent 7a9dc5ab
#
# innodb_instrument_semaphores
#
# save the initial value
SET @innodb_instrument_semaphores_global_saved = @@global.innodb_instrument_semaphores;
# default
SELECT @@global.innodb_instrument_semaphores;
@@global.innodb_instrument_semaphores
0
# scope
SELECT @@session.innodb_instrument_semaphores;
ERROR HY000: Variable 'innodb_instrument_semaphores' is a GLOBAL variable
SET @@global.innodb_instrument_semaphores=OFF;
Warnings:
Warning 131 Using innodb_instrument_semaphores is deprecated and the parameter will be removed in MariaDB 10.3.
SELECT @@global.innodb_instrument_semaphores;
@@global.innodb_instrument_semaphores
0
SET @@global.innodb_instrument_semaphores=ON;
Warnings:
Warning 131 Using innodb_instrument_semaphores is deprecated and the parameter will be removed in MariaDB 10.3.
SELECT @@global.innodb_instrument_semaphores;
@@global.innodb_instrument_semaphores
1
# valid values
SET @@global.innodb_instrument_semaphores='OFF';
Warnings:
Warning 131 Using innodb_instrument_semaphores is deprecated and the parameter will be removed in MariaDB 10.3.
SELECT @@global.innodb_instrument_semaphores;
@@global.innodb_instrument_semaphores
0
SET @@global.innodb_instrument_semaphores=ON;
Warnings:
Warning 131 Using innodb_instrument_semaphores is deprecated and the parameter will be removed in MariaDB 10.3.
SELECT @@global.innodb_instrument_semaphores;
@@global.innodb_instrument_semaphores
1
SET @@global.innodb_instrument_semaphores=default;
Warnings:
Warning 131 Using innodb_instrument_semaphores is deprecated and the parameter will be removed in MariaDB 10.3.
SELECT @@global.innodb_instrument_semaphores;
@@global.innodb_instrument_semaphores
0
# invalid values
SET @@global.innodb_instrument_semaphores=NULL;
ERROR 42000: Variable 'innodb_instrument_semaphores' can't be set to the value of 'NULL'
SET @@global.innodb_instrument_semaphores='junk';
ERROR 42000: Variable 'innodb_instrument_semaphores' can't be set to the value of 'junk'
# restore the initial value
SET @@global.innodb_instrument_semaphores = @innodb_instrument_semaphores_global_saved;
Warnings:
Warning 131 Using innodb_instrument_semaphores is deprecated and the parameter will be removed in MariaDB 10.3.
# End of test
SET @start_use_trim = @@global.innodb_use_trim;
SELECT @start_use_trim;
@start_use_trim
1
SELECT COUNT(@@GLOBAL.innodb_use_trim);
COUNT(@@GLOBAL.innodb_use_trim)
1
1 Expected
SET @@GLOBAL.innodb_use_trim=1;
Warnings:
Warning 131 Using innodb_use_trim is deprecated and the parameter will be removed in MariaDB 10.3.
SELECT COUNT(@@GLOBAL.innodb_use_trim);
COUNT(@@GLOBAL.innodb_use_trim)
1
1 Expected
SELECT IF(@@GLOBAL.innodb_use_trim, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_use_trim';
IF(@@GLOBAL.innodb_use_trim, 'ON', 'OFF') = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_use_trim);
COUNT(@@GLOBAL.innodb_use_trim)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_use_trim';
COUNT(VARIABLE_VALUE)
1
1 Expected
SET @@global.innodb_use_trim = @start_use_trim;
Warnings:
Warning 131 Using innodb_use_trim is deprecated and the parameter will be removed in MariaDB 10.3.
SELECT @@global.innodb_use_trim;
@@global.innodb_use_trim
1
......@@ -1294,20 +1294,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_INSTRUMENT_SEMAPHORES
SESSION_VALUE NULL
GLOBAL_VALUE OFF
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT DEPRECATED. This setting has no effect.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_IO_CAPACITY
SESSION_VALUE NULL
GLOBAL_VALUE 200
......@@ -2491,7 +2477,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Enable atomic writes, instead of using the doublewrite buffer, for files on devices that supports atomic writes. To use this option one must use file_per_table=1, flush_method=O_DIRECT and use_fallocate=1. This option only works on Linux with either FusionIO cards using the directFS filesystem or with Shannon cards using any file system.
VARIABLE_COMMENT Enable atomic writes, instead of using the doublewrite buffer, for files on devices that supports atomic writes. To use this option one must use innodb_file_per_table=1, innodb_flush_method=O_DIRECT. This option only works on Linux with either FusionIO cards using the directFS filesystem or with Shannon cards using any file system.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
......@@ -2512,20 +2498,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_TRIM
SESSION_VALUE NULL
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Deallocate (punch_hole|trim) unused portions of the page compressed page (on by default)
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
SESSION_VALUE NULL
GLOBAL_VALUE 5.7.14
......
--source include/have_innodb.inc
--echo #
--echo # innodb_instrument_semaphores
--echo #
--echo # save the initial value
SET @innodb_instrument_semaphores_global_saved = @@global.innodb_instrument_semaphores;
--echo # default
SELECT @@global.innodb_instrument_semaphores;
--echo
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.innodb_instrument_semaphores;
SET @@global.innodb_instrument_semaphores=OFF;
SELECT @@global.innodb_instrument_semaphores;
SET @@global.innodb_instrument_semaphores=ON;
SELECT @@global.innodb_instrument_semaphores;
--echo
--echo # valid values
SET @@global.innodb_instrument_semaphores='OFF';
SELECT @@global.innodb_instrument_semaphores;
SET @@global.innodb_instrument_semaphores=ON;
SELECT @@global.innodb_instrument_semaphores;
SET @@global.innodb_instrument_semaphores=default;
SELECT @@global.innodb_instrument_semaphores;
--echo
--echo # invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_instrument_semaphores=NULL;
--error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_instrument_semaphores='junk';
--echo
--echo # restore the initial value
SET @@global.innodb_instrument_semaphores = @innodb_instrument_semaphores_global_saved;
--echo # End of test
--source include/have_innodb.inc
SET @start_use_trim = @@global.innodb_use_trim;
SELECT @start_use_trim;
SELECT COUNT(@@GLOBAL.innodb_use_trim);
--echo 1 Expected
####################################################################
# Check if Value can set #
####################################################################
SET @@GLOBAL.innodb_use_trim=1;
SELECT COUNT(@@GLOBAL.innodb_use_trim);
--echo 1 Expected
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
SELECT IF(@@GLOBAL.innodb_use_trim, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_use_trim';
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_use_trim);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_use_trim';
--echo 1 Expected
SET @@global.innodb_use_trim = @start_use_trim;
SELECT @@global.innodb_use_trim;
\ No newline at end of file
......@@ -349,13 +349,6 @@ fil_compress_page(
srv_stats.page_compression_saved.add((len - write_size));
srv_stats.pages_page_compressed.inc();
/* If we do not persistently trim rest of page, we need to write it
all */
if (!srv_use_trim) {
memset(out_buf+write_size,0,len-write_size);
write_size = len;
}
*out_len = write_size;
if (allocated) {
......
......@@ -3748,18 +3748,6 @@ static const char* deprecated_file_format_check
static const char* deprecated_file_format_max
= DEPRECATED_FORMAT_PARAMETER("innodb_file_format_max");
/** Deprecation message about innodb_use_trim */
static const char* deprecated_use_trim
= "Using innodb_use_trim is deprecated"
" and the parameter will be removed in MariaDB 10.3.";
/** Deprecation message about innodb_instrument_semaphores */
static const char* deprecated_instrument_semaphores
= "Using innodb_instrument_semaphores is deprecated"
" and the parameter will be removed in MariaDB 10.3.";
static my_bool innodb_instrument_semaphores;
/** Update log_checksum_algorithm_ptr with a pointer to the function
corresponding to whether checksums are enabled.
@param[in,out] thd client session, or NULL if at startup
......@@ -4115,10 +4103,6 @@ innobase_init(
ib::warn() << deprecated_file_format;
}
if (innodb_instrument_semaphores) {
ib::warn() << deprecated_instrument_semaphores;
}
/* Validate the file format by animal name */
if (innobase_file_format_name != NULL) {
......@@ -20606,44 +20590,6 @@ wsrep_fake_trx_id(
#endif /* WITH_WSREP */
/** Update the innodb_use_trim parameter.
@param[in] thd thread handle
@param[in] var system variable
@param[out] var_ptr current value
@param[in] save immediate result from check function */
static
void
innodb_use_trim_update(
THD* thd,
struct st_mysql_sys_var* var,
void* var_ptr,
const void* save)
{
srv_use_trim = *static_cast<const my_bool*>(save);
push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
HA_ERR_WRONG_COMMAND, deprecated_use_trim);
}
/** Update the innodb_instrument_sempahores parameter.
@param[in] thd thread handle
@param[in] var system variable
@param[out] var_ptr current value
@param[in] save immediate result from check function */
static
void
innodb_instrument_semaphores_update(
THD* thd,
struct st_mysql_sys_var* var,
void* var_ptr,
const void* save)
{
innodb_instrument_semaphores = *static_cast<const my_bool*>(save);
push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
HA_ERR_WRONG_COMMAND, deprecated_instrument_semaphores);
}
/* plugin options */
static MYSQL_SYSVAR_ENUM(checksum_algorithm, srv_checksum_algorithm,
......@@ -20699,7 +20645,7 @@ static MYSQL_SYSVAR_BOOL(use_atomic_writes, innobase_use_atomic_writes,
"Enable atomic writes, instead of using the doublewrite buffer, for files "
"on devices that supports atomic writes. "
"To use this option one must use "
"file_per_table=1, flush_method=O_DIRECT and use_fallocate=1. "
"innodb_file_per_table=1, innodb_flush_method=O_DIRECT. "
"This option only works on Linux with either FusionIO cards using "
"the directFS filesystem or with Shannon cards using any file system.",
NULL, NULL, TRUE);
......@@ -21702,11 +21648,6 @@ static MYSQL_SYSVAR_BOOL(force_primary_key,
"Do not allow to create table without primary key (off by default)",
NULL, NULL, FALSE);
static MYSQL_SYSVAR_BOOL(use_trim, srv_use_trim,
PLUGIN_VAR_OPCMDARG,
"Deallocate (punch_hole|trim) unused portions of the page compressed page (on by default)",
NULL, innodb_use_trim_update, TRUE);
static const char *page_compression_algorithms[]= { "none", "zlib", "lz4", "lzo", "lzma", "bzip2", "snappy", 0 };
static TYPELIB page_compression_algorithms_typelib=
{
......@@ -21852,11 +21793,6 @@ static MYSQL_SYSVAR_BOOL(debug_force_scrubbing,
NULL, NULL, FALSE);
#endif /* UNIV_DEBUG */
static MYSQL_SYSVAR_BOOL(instrument_semaphores, innodb_instrument_semaphores,
PLUGIN_VAR_OPCMDARG,
"DEPRECATED. This setting has no effect.",
NULL, innodb_instrument_semaphores_update, FALSE);
static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(autoextend_increment),
MYSQL_SYSVAR(buffer_pool_size),
......@@ -22038,7 +21974,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(force_primary_key),
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),
......@@ -22061,7 +21996,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
#ifdef UNIV_DEBUG
MYSQL_SYSVAR(debug_force_scrubbing),
#endif
MYSQL_SYSVAR(instrument_semaphores),
MYSQL_SYSVAR(buf_dump_status_frequency),
MYSQL_SYSVAR(background_thread),
NULL
......
......@@ -50,7 +50,6 @@ struct fil_node_t;
struct fil_space_t;
extern bool os_has_said_disk_full;
extern my_bool srv_use_trim;
/** Number of pending read operations */
extern ulint os_n_pending_reads;
......@@ -240,7 +239,7 @@ class IORequest {
m_fil_node(NULL),
m_type(static_cast<uint16_t>(type))
{
if (!is_punch_hole_supported() || !srv_use_trim) {
if (!is_punch_hole_supported()) {
clear_punch_hole();
}
}
......@@ -259,7 +258,7 @@ class IORequest {
set_punch_hole();
}
if (!is_punch_hole_supported() || !srv_use_trim) {
if (!is_punch_hole_supported()) {
clear_punch_hole();
}
}
......@@ -346,7 +345,7 @@ class IORequest {
/** Set the punch hole flag */
void set_punch_hole()
{
if (is_punch_hole_supported() && srv_use_trim) {
if (is_punch_hole_supported()) {
m_type |= PUNCH_HOLE;
}
}
......@@ -361,8 +360,7 @@ class IORequest {
@param[in] node File node */
void set_fil_node(fil_node_t* node)
{
if (!srv_use_trim ||
(node && !fil_node_should_punch_hole(node))) {
if (node && !fil_node_should_punch_hole(node)) {
clear_punch_hole();
}
......
......@@ -279,9 +279,6 @@ Currently we support native aio on windows and linux */
extern my_bool srv_use_native_aio;
extern my_bool srv_numa_interleave;
/* Use trim operation */
extern my_bool srv_use_trim;
/* Use atomic writes i.e disable doublewrite buffer */
extern my_bool srv_use_atomic_writes;
......
......@@ -5533,7 +5533,7 @@ IORequest::punch_hole(
/* Check does file system support punching holes for this
tablespace. */
if (!should_punch_hole() || !srv_use_trim) {
if (!should_punch_hole()) {
return DB_IO_NO_PUNCH_HOLE;
}
......
......@@ -182,9 +182,6 @@ use simulated aio we build below with threads.
Currently we support native aio on windows and linux */
my_bool srv_use_native_aio = TRUE;
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;
/* 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