Commit b5852ffb authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-27735 Deprecate the parameter innodb_change_buffering

As a follow-up to MDEV-27734 Set innodb_change_buffering=none by default
we mark the option innodb_change_buffering deprecated, to inform users
of its future removal.
parent 9451e90a
......@@ -21,7 +21,6 @@ Warning 1478 Ignoring encryption parameter during temporary table creation.
INSERT INTO t VALUES
(NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'),
(NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament');
SET GLOBAL innodb_change_buffering=none;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
INSERT INTO t0
SELECT NULL, t1.col_int, t1.col_int_key, t1.col_char, t1.col_char_key
......
......@@ -29,11 +29,6 @@ INSERT INTO t VALUES
(NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'),
(NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament');
# Prevent change buffering of key(col_char_key), so that
# after the restart, the data ('secret','success','secure','sacrament')
# cannot be emitted to the unencrypted redo log by change buffer merge.
SET GLOBAL innodb_change_buffering=none;
# Force a redo log flush at the next commit.
SET GLOBAL innodb_flush_log_at_trx_commit=1;
INSERT INTO t0
......
......@@ -6,6 +6,8 @@ INDEX(b))
ENGINE=InnoDB STATS_PERSISTENT=0;
SET GLOBAL innodb_change_buffering_debug = 1;
SET GLOBAL innodb_change_buffering=all;
Warnings:
Warning 138 The parameter innodb_change_buffering is deprecated
INSERT INTO t1 SELECT 0,'x',1 FROM seq_1_to_1024;
# restart: --innodb-force-recovery=6 --innodb-change-buffer-dump
check table t1;
......
......@@ -14,6 +14,8 @@ INDEX(b))
ENGINE=InnoDB STATS_PERSISTENT=0;
SET GLOBAL innodb_change_buffering_debug = 1;
SET GLOBAL innodb_change_buffering = all;
Warnings:
Warning 138 The parameter innodb_change_buffering is deprecated
INSERT INTO t1 SELECT 0,'x',1 FROM seq_1_to_8192;
BEGIN;
SELECT b FROM t1 LIMIT 3;
......
......@@ -24,6 +24,8 @@ select * from information_schema.session_variables where variable_name='innodb_c
VARIABLE_NAME VARIABLE_VALUE
INNODB_CHANGE_BUFFERING none
set global innodb_change_buffering='none';
Warnings:
Warning 138 The parameter innodb_change_buffering is deprecated
select @@global.innodb_change_buffering;
@@global.innodb_change_buffering
none
......@@ -34,6 +36,8 @@ select * from information_schema.session_variables where variable_name='innodb_c
VARIABLE_NAME VARIABLE_VALUE
INNODB_CHANGE_BUFFERING none
set @@global.innodb_change_buffering='inserts';
Warnings:
Warning 138 The parameter innodb_change_buffering is deprecated
select @@global.innodb_change_buffering;
@@global.innodb_change_buffering
inserts
......@@ -50,6 +54,8 @@ ERROR HY000: Variable 'innodb_change_buffering' is a GLOBAL variable and should
set global innodb_change_buffering=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering'
set global innodb_change_buffering=1;
Warnings:
Warning 138 The parameter innodb_change_buffering is deprecated
SELECT @@global.innodb_change_buffering;
@@global.innodb_change_buffering
inserts
......@@ -60,6 +66,8 @@ ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering'
set global innodb_change_buffering='some';
ERROR 42000: Variable 'innodb_change_buffering' can't be set to the value of 'some'
SET @@global.innodb_change_buffering = @start_global_value;
Warnings:
Warning 138 The parameter innodb_change_buffering is deprecated
SELECT @@global.innodb_change_buffering;
@@global.innodb_change_buffering
none
......@@ -230,7 +230,7 @@ SESSION_VALUE NULL
DEFAULT_VALUE none
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Buffer changes to secondary indexes.
VARIABLE_COMMENT Buffer changes to secondary indexes (deprecated).
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
......
......@@ -417,6 +417,14 @@ static TYPELIB innodb_change_buffering_typelib = {
NULL
};
static void innodb_change_buffering_deprecated(THD *thd, st_mysql_sys_var*,
void *var_ptr, const void *save)
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, HA_ERR_UNSUPPORTED,
"The parameter innodb_change_buffering is deprecated");
*static_cast<ulong*>(var_ptr) = *static_cast<const ulong*>(save);
}
/** Allowed values of innodb_instant_alter_column_allowed */
const char* innodb_instant_alter_column_allowed_names[] = {
"never", /* compatible with MariaDB 5.5 to 10.2 */
......@@ -19365,8 +19373,9 @@ static MYSQL_SYSVAR_BOOL(numa_interleave, srv_numa_interleave,
static MYSQL_SYSVAR_ENUM(change_buffering, innodb_change_buffering,
PLUGIN_VAR_RQCMDARG,
"Buffer changes to secondary indexes.",
NULL, NULL, IBUF_USE_NONE, &innodb_change_buffering_typelib);
"Buffer changes to secondary indexes (deprecated).",
nullptr, innodb_change_buffering_deprecated, IBUF_USE_NONE,
&innodb_change_buffering_typelib);
static MYSQL_SYSVAR_UINT(change_buffer_max_size,
srv_change_buffer_max_size,
......
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