diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_log.result b/mysql-test/suite/encryption/r/innodb_encrypt_log.result index b436435090b..5c6c7ebae90 100644 --- a/mysql-test/suite/encryption/r/innodb_encrypt_log.result +++ b/mysql-test/suite/encryption/r/innodb_encrypt_log.result @@ -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 diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_log.test b/mysql-test/suite/encryption/t/innodb_encrypt_log.test index 1d016be73c8..5448a606ba8 100644 --- a/mysql-test/suite/encryption/t/innodb_encrypt_log.test +++ b/mysql-test/suite/encryption/t/innodb_encrypt_log.test @@ -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 diff --git a/mysql-test/suite/innodb/r/ibuf_not_empty.result b/mysql-test/suite/innodb/r/ibuf_not_empty.result index f2da89990b0..1a245cd11f6 100644 --- a/mysql-test/suite/innodb/r/ibuf_not_empty.result +++ b/mysql-test/suite/innodb/r/ibuf_not_empty.result @@ -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; diff --git a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result index 670340f3583..a0a0279858e 100644 --- a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result +++ b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result @@ -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; diff --git a/mysql-test/suite/sys_vars/r/innodb_change_buffering_basic.result b/mysql-test/suite/sys_vars/r/innodb_change_buffering_basic.result index c11f4ee617c..e6d81dd6b79 100644 --- a/mysql-test/suite/sys_vars/r/innodb_change_buffering_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_change_buffering_basic.result @@ -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 diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index 69986f31882..5c379b8d022 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -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 diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index a8ed2dd6bfb..bf2ab743a4c 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -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(var_ptr) = *static_cast(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,