mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
MDEV-19514 preparation: Remove innodb_change_buffering_debug=2
The setting innodb_change_buffering_debug=2 was supposed to inject a crash during change buffer merge. There is no public test for that functionality, and even if there were, it would be better to use DEBUG_SYNC to halt the thread that does change buffer merge, force a redo log flush from another thread, and finally kill the server externally.
This commit is contained in:
parent
2336e0b394
commit
43a6e81ccb
5 changed files with 12 additions and 24 deletions
|
@ -55,6 +55,12 @@ Warnings:
|
||||||
Warning 1292 Truncated incorrect innodb_change_buffering_debug value: '-2'
|
Warning 1292 Truncated incorrect innodb_change_buffering_debug value: '-2'
|
||||||
set global innodb_change_buffering_debug=1e1;
|
set global innodb_change_buffering_debug=1e1;
|
||||||
ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering_debug'
|
ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering_debug'
|
||||||
|
set global innodb_change_buffering_debug=2;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect innodb_change_buffering_debug value: '2'
|
||||||
|
select @@global.innodb_change_buffering_debug;
|
||||||
|
@@global.innodb_change_buffering_debug
|
||||||
|
1
|
||||||
SET @@global.innodb_change_buffering_debug = @start_global_value;
|
SET @@global.innodb_change_buffering_debug = @start_global_value;
|
||||||
SELECT @@global.innodb_change_buffering_debug;
|
SELECT @@global.innodb_change_buffering_debug;
|
||||||
@@global.innodb_change_buffering_debug
|
@@global.innodb_change_buffering_debug
|
||||||
|
|
|
@ -347,9 +347,9 @@ SESSION_VALUE NULL
|
||||||
DEFAULT_VALUE 0
|
DEFAULT_VALUE 0
|
||||||
VARIABLE_SCOPE GLOBAL
|
VARIABLE_SCOPE GLOBAL
|
||||||
VARIABLE_TYPE INT UNSIGNED
|
VARIABLE_TYPE INT UNSIGNED
|
||||||
VARIABLE_COMMENT Debug flags for InnoDB change buffering (0=none, 2=crash at merge)
|
VARIABLE_COMMENT Debug flags for InnoDB change buffering (0=none, 1=try to buffer)
|
||||||
NUMERIC_MIN_VALUE 0
|
NUMERIC_MIN_VALUE 0
|
||||||
NUMERIC_MAX_VALUE 2
|
NUMERIC_MAX_VALUE 1
|
||||||
NUMERIC_BLOCK_SIZE 0
|
NUMERIC_BLOCK_SIZE 0
|
||||||
ENUM_VALUE_LIST NULL
|
ENUM_VALUE_LIST NULL
|
||||||
READ_ONLY NO
|
READ_ONLY NO
|
||||||
|
|
|
@ -48,9 +48,8 @@ set global innodb_change_buffering_debug='foo';
|
||||||
set global innodb_change_buffering_debug=-2;
|
set global innodb_change_buffering_debug=-2;
|
||||||
--error ER_WRONG_TYPE_FOR_VAR
|
--error ER_WRONG_TYPE_FOR_VAR
|
||||||
set global innodb_change_buffering_debug=1e1;
|
set global innodb_change_buffering_debug=1e1;
|
||||||
# The value 2 is supposed to kill the server if there are unmerged changes.
|
set global innodb_change_buffering_debug=2;
|
||||||
# Do not try to set the value to 2 or anything that can be clamped to 2.
|
select @@global.innodb_change_buffering_debug;
|
||||||
#set global innodb_change_buffering_debug=2;
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cleanup
|
# Cleanup
|
||||||
|
|
|
@ -20616,8 +20616,8 @@ static MYSQL_SYSVAR_ENUM(stats_method, srv_innodb_stats_method,
|
||||||
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
|
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
|
||||||
static MYSQL_SYSVAR_UINT(change_buffering_debug, ibuf_debug,
|
static MYSQL_SYSVAR_UINT(change_buffering_debug, ibuf_debug,
|
||||||
PLUGIN_VAR_RQCMDARG,
|
PLUGIN_VAR_RQCMDARG,
|
||||||
"Debug flags for InnoDB change buffering (0=none, 2=crash at merge)",
|
"Debug flags for InnoDB change buffering (0=none, 1=try to buffer)",
|
||||||
NULL, NULL, 0, 0, 2, 0);
|
NULL, NULL, 0, 0, 1, 0);
|
||||||
|
|
||||||
static MYSQL_SYSVAR_BOOL(disable_background_merge,
|
static MYSQL_SYSVAR_BOOL(disable_background_merge,
|
||||||
srv_ibuf_disable_background_merge,
|
srv_ibuf_disable_background_merge,
|
||||||
|
|
|
@ -4241,23 +4241,6 @@ ibuf_delete_rec(
|
||||||
ut_ad(ibuf_rec_get_page_no(mtr, btr_pcur_get_rec(pcur)) == page_no);
|
ut_ad(ibuf_rec_get_page_no(mtr, btr_pcur_get_rec(pcur)) == page_no);
|
||||||
ut_ad(ibuf_rec_get_space(mtr, btr_pcur_get_rec(pcur)) == space);
|
ut_ad(ibuf_rec_get_space(mtr, btr_pcur_get_rec(pcur)) == space);
|
||||||
|
|
||||||
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
|
|
||||||
if (ibuf_debug == 2) {
|
|
||||||
/* Inject a fault (crash). We do this before trying
|
|
||||||
optimistic delete, because a pessimistic delete in the
|
|
||||||
change buffer would require a larger test case. */
|
|
||||||
|
|
||||||
/* Flag the buffered record as processed, to avoid
|
|
||||||
an assertion failure after crash recovery. */
|
|
||||||
btr_cur_set_deleted_flag_for_ibuf(
|
|
||||||
btr_pcur_get_rec(pcur), NULL, TRUE, mtr);
|
|
||||||
|
|
||||||
ibuf_mtr_commit(mtr);
|
|
||||||
log_write_up_to(LSN_MAX, true);
|
|
||||||
DBUG_SUICIDE();
|
|
||||||
}
|
|
||||||
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
|
|
||||||
|
|
||||||
success = btr_cur_optimistic_delete(btr_pcur_get_btr_cur(pcur),
|
success = btr_cur_optimistic_delete(btr_pcur_get_btr_cur(pcur),
|
||||||
0, mtr);
|
0, mtr);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue