Skip to content

Commit b5852ff

Browse files
committed
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.
1 parent 9451e90 commit b5852ff

File tree

7 files changed

+24
-9
lines changed

7 files changed

+24
-9
lines changed

mysql-test/suite/encryption/r/innodb_encrypt_log.result

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Warning 1478 Ignoring encryption parameter during temporary table creation.
2121
INSERT INTO t VALUES
2222
(NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'),
2323
(NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament');
24-
SET GLOBAL innodb_change_buffering=none;
2524
SET GLOBAL innodb_flush_log_at_trx_commit=1;
2625
INSERT INTO t0
2726
SELECT NULL, t1.col_int, t1.col_int_key, t1.col_char, t1.col_char_key

mysql-test/suite/encryption/t/innodb_encrypt_log.test

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ INSERT INTO t VALUES
2929
(NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'),
3030
(NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament');
3131

32-
# Prevent change buffering of key(col_char_key), so that
33-
# after the restart, the data ('secret','success','secure','sacrament')
34-
# cannot be emitted to the unencrypted redo log by change buffer merge.
35-
SET GLOBAL innodb_change_buffering=none;
36-
3732
# Force a redo log flush at the next commit.
3833
SET GLOBAL innodb_flush_log_at_trx_commit=1;
3934
INSERT INTO t0

mysql-test/suite/innodb/r/ibuf_not_empty.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ INDEX(b))
66
ENGINE=InnoDB STATS_PERSISTENT=0;
77
SET GLOBAL innodb_change_buffering_debug = 1;
88
SET GLOBAL innodb_change_buffering=all;
9+
Warnings:
10+
Warning 138 The parameter innodb_change_buffering is deprecated
911
INSERT INTO t1 SELECT 0,'x',1 FROM seq_1_to_1024;
1012
# restart: --innodb-force-recovery=6 --innodb-change-buffer-dump
1113
check table t1;

mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ INDEX(b))
1414
ENGINE=InnoDB STATS_PERSISTENT=0;
1515
SET GLOBAL innodb_change_buffering_debug = 1;
1616
SET GLOBAL innodb_change_buffering = all;
17+
Warnings:
18+
Warning 138 The parameter innodb_change_buffering is deprecated
1719
INSERT INTO t1 SELECT 0,'x',1 FROM seq_1_to_8192;
1820
BEGIN;
1921
SELECT b FROM t1 LIMIT 3;

mysql-test/suite/sys_vars/r/innodb_change_buffering_basic.result

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ select * from information_schema.session_variables where variable_name='innodb_c
2424
VARIABLE_NAME VARIABLE_VALUE
2525
INNODB_CHANGE_BUFFERING none
2626
set global innodb_change_buffering='none';
27+
Warnings:
28+
Warning 138 The parameter innodb_change_buffering is deprecated
2729
select @@global.innodb_change_buffering;
2830
@@global.innodb_change_buffering
2931
none
@@ -34,6 +36,8 @@ select * from information_schema.session_variables where variable_name='innodb_c
3436
VARIABLE_NAME VARIABLE_VALUE
3537
INNODB_CHANGE_BUFFERING none
3638
set @@global.innodb_change_buffering='inserts';
39+
Warnings:
40+
Warning 138 The parameter innodb_change_buffering is deprecated
3741
select @@global.innodb_change_buffering;
3842
@@global.innodb_change_buffering
3943
inserts
@@ -50,6 +54,8 @@ ERROR HY000: Variable 'innodb_change_buffering' is a GLOBAL variable and should
5054
set global innodb_change_buffering=1.1;
5155
ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering'
5256
set global innodb_change_buffering=1;
57+
Warnings:
58+
Warning 138 The parameter innodb_change_buffering is deprecated
5359
SELECT @@global.innodb_change_buffering;
5460
@@global.innodb_change_buffering
5561
inserts
@@ -60,6 +66,8 @@ ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering'
6066
set global innodb_change_buffering='some';
6167
ERROR 42000: Variable 'innodb_change_buffering' can't be set to the value of 'some'
6268
SET @@global.innodb_change_buffering = @start_global_value;
69+
Warnings:
70+
Warning 138 The parameter innodb_change_buffering is deprecated
6371
SELECT @@global.innodb_change_buffering;
6472
@@global.innodb_change_buffering
6573
none

mysql-test/suite/sys_vars/r/sysvars_innodb.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ SESSION_VALUE NULL
230230
DEFAULT_VALUE none
231231
VARIABLE_SCOPE GLOBAL
232232
VARIABLE_TYPE ENUM
233-
VARIABLE_COMMENT Buffer changes to secondary indexes.
233+
VARIABLE_COMMENT Buffer changes to secondary indexes (deprecated).
234234
NUMERIC_MIN_VALUE NULL
235235
NUMERIC_MAX_VALUE NULL
236236
NUMERIC_BLOCK_SIZE NULL

storage/innobase/handler/ha_innodb.cc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,14 @@ static TYPELIB innodb_change_buffering_typelib = {
417417
NULL
418418
};
419419

420+
static void innodb_change_buffering_deprecated(THD *thd, st_mysql_sys_var*,
421+
void *var_ptr, const void *save)
422+
{
423+
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, HA_ERR_UNSUPPORTED,
424+
"The parameter innodb_change_buffering is deprecated");
425+
*static_cast<ulong*>(var_ptr) = *static_cast<const ulong*>(save);
426+
}
427+
420428
/** Allowed values of innodb_instant_alter_column_allowed */
421429
const char* innodb_instant_alter_column_allowed_names[] = {
422430
"never", /* compatible with MariaDB 5.5 to 10.2 */
@@ -19365,8 +19373,9 @@ static MYSQL_SYSVAR_BOOL(numa_interleave, srv_numa_interleave,
1936519373

1936619374
static MYSQL_SYSVAR_ENUM(change_buffering, innodb_change_buffering,
1936719375
PLUGIN_VAR_RQCMDARG,
19368-
"Buffer changes to secondary indexes.",
19369-
NULL, NULL, IBUF_USE_NONE, &innodb_change_buffering_typelib);
19376+
"Buffer changes to secondary indexes (deprecated).",
19377+
nullptr, innodb_change_buffering_deprecated, IBUF_USE_NONE,
19378+
&innodb_change_buffering_typelib);
1937019379

1937119380
static MYSQL_SYSVAR_UINT(change_buffer_max_size,
1937219381
srv_change_buffer_max_size,

0 commit comments

Comments
 (0)