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

MDEV-27094 Debug builds include useless InnoDB "disabled" options

This is a backport of commit 4489a89c
in order to remove the test innodb.redo_log_during_checkpoint
that would cause trouble in the DBUG subsystem invoked by
safe_mutex_lock() via log_checkpoint(). Before
commit 7cffb5f6
these mutexes were of different type.

The following options were introduced in
commit 2e814d47 (mariadb-10.2.2)
and have little use:

innodb_disable_resize_buffer_pool_debug had no effect even in
MariaDB 10.2.2 or MySQL 5.7.9. It was introduced in
mysql/mysql-server@5c4094cf4971eebab89da4ee4ae92c71f69cd524
to work around a problem that was fixed in
mysql/mysql-server@2957ae4f990bf3aed25822b0ce15d3ccad0b54b6
(but the parameter was not removed).

innodb_page_cleaner_disabled_debug and innodb_master_thread_disabled_debug
are only used by the test innodb.redo_log_during_checkpoint
that will be removed as part of this commit.

innodb_dict_stats_disabled_debug is only used by that test,
and it is redundant because one could simply use
innodb_stats_persistent=OFF or the STATS_PERSISTENT=0 attribute
of the table in the test to achieve the same effect.
parent 620c55e7
......@@ -3,7 +3,6 @@
# ONLINE WITH MEMORY FULL CONDITION
#
call mtr.add_suppression("InnoDB: failed to allocate the chunk array");
SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
SET GLOBAL debug_dbug='+d,buf_pool_resize_chunk_null';
SET GLOBAL innodb_buffer_pool_size=@@innodb_buffer_pool_size + 1048576;
# restart
set global innodb_file_per_table=ON;
connect con1,localhost,root,,;
connect con2,localhost,root,,;
connect con3,localhost,root,,;
connect con4,localhost,root,,;
connect con5,localhost,root,,;
connect con6,localhost,root,,;
connect con7,localhost,root,,;
connect con8,localhost,root,,;
create table t2 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into t2 (c1, c2) values (1, 1);
create table t3 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into t3 (c1, c2) values (1, 1);
create table t4 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into t4 (c1, c2) values (1, 1);
create table t5 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into t5 (c1, c2) values (1, 1);
create table t6 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into t6 (c1, c2) values (1, 1);
create database test2;
create table test2.t7 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into test2.t7 (c1, c2) values (1, 1);
drop table test2.t7;
connection con1;
set @save_dbug=@@global.debug_dbug;
set global debug_dbug="+d,ib_buf_pool_resize_wait_before_resize";
set global innodb_buffer_pool_size = 12*1024*1024;
set global innodb_buffer_pool_size = 8*1024*1024;
ERROR HY000: Another buffer pool resize is already in progress.
select @@global.innodb_buffer_pool_size;
@@global.innodb_buffer_pool_size
8388608
select @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
0
set global innodb_adaptive_hash_index = ON;
select @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
0
set global innodb_adaptive_hash_index = OFF;
select @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
0
create table t1 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
connection con2;
set use_stat_tables=never;
analyze table t2;
connection con3;
alter table t3 algorithm=inplace, add index idx (c1);
connection con4;
alter table t4 rename to t0;
connection con5;
drop table t5;
connection con6;
alter table t6 discard tablespace;
connection con7;
drop database test2;
connection con8;
select count(*) > 0 from information_schema.innodb_buffer_page;
connection default;
set global debug_dbug=@save_dbug;
connection con1;
connection con2;
Table Op Msg_type Msg_text
test.t2 analyze status OK
connection con3;
connection con4;
connection con5;
connection con6;
connection con7;
connection con8;
count(*) > 0
1
connection default;
disconnect con3;
disconnect con4;
disconnect con5;
disconnect con6;
disconnect con7;
disconnect con8;
disconnect con1;
disconnect con2;
call mtr.add_suppression("\\[ERROR\\] InnoDB: buffer pool 0 : failed to allocate new memory.");
connection default;
set global debug_dbug="+d,ib_buf_chunk_init_fails";
set global innodb_buffer_pool_size = 16*1024*1024;
set global debug_dbug=@save_dbug;
create table t8 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into t8 (c1, c2) values (1, 1);
drop table t8;
drop table t1;
drop table t2;
drop table t3;
drop table t0;
drop table t6;
#
# BUG#23590280 NO WARNING WHEN REDUCING INNODB_BUFFER_POOL_SIZE INSIZE THE FIRST CHUNK
#
set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug;
set global innodb_disable_resize_buffer_pool_debug = OFF;
set @before_innodb_buffer_pool_size = @@innodb_buffer_pool_size;
set global innodb_buffer_pool_size=@before_innodb_buffer_pool_size;
set global innodb_buffer_pool_size=@before_innodb_buffer_pool_size * 2;
set global innodb_buffer_pool_size=@before_innodb_buffer_pool_size;
set global innodb_buffer_pool_size=@before_innodb_buffer_pool_size;
SET GLOBAL innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize;
SET @save_limit=@@GLOBAL.innodb_limit_optimistic_insert_debug;
SET @save_disable=@@GLOBAL.innodb_disable_resize_buffer_pool_debug;
SET @save_size=@@GLOBAL.innodb_buffer_pool_size;
SET GLOBAL innodb_limit_optimistic_insert_debug=2;
SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
SET GLOBAL innodb_buffer_pool_size=16777216;
CREATE TEMPORARY TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 SELECT seq FROM seq_1_to_200;
......@@ -13,4 +11,3 @@ COUNT(*) MIN(a) MAX(a)
DROP TEMPORARY TABLE t1;
SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
SET GLOBAL innodb_buffer_pool_size=@save_size;
SET GLOBAL innodb_disable_resize_buffer_pool_debug=@save_disable;
SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
SET GLOBAL innodb_dict_stats_disabled_debug = 1;
SET GLOBAL innodb_master_thread_disabled_debug = 1;
SET GLOBAL innodb_log_checkpoint_now = 1;
CREATE DATABASE very_long_database_name;
USE very_long_database_name;
SET debug_dbug = '+d,increase_mtr_checkpoint_size';
set global innodb_log_checkpoint_now = 1;
DROP DATABASE very_long_database_name;
SET GLOBAL innodb_flush_sync=OFF;
SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
SET GLOBAL innodb_dict_stats_disabled_debug = 1;
SET GLOBAL innodb_master_thread_disabled_debug = 1;
SET GLOBAL innodb_log_checkpoint_now = 1;
# Commit the multi-rec mini transaction if mtr size
# exceeds LOG_CHECKPOINT_FREE_PER_THREAD size during checkpoint.
CREATE DATABASE very_long_database_name;
USE very_long_database_name;
set global innodb_log_checkpoint_now = 1;
DROP DATABASE very_long_database_name;
......@@ -9,7 +9,6 @@
call mtr.add_suppression("InnoDB: failed to allocate the chunk array");
SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
SET GLOBAL debug_dbug='+d,buf_pool_resize_chunk_null';
--disable_warnings
......
......@@ -14,11 +14,6 @@ let $wait_condition =
--disable_query_log
set @old_innodb_buffer_pool_size = @@innodb_buffer_pool_size;
set @old_innodb_adaptive_hash_index = @@innodb_adaptive_hash_index;
if (`select (version() like '%debug%') > 0`)
{
set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug;
set global innodb_disable_resize_buffer_pool_debug = OFF;
}
--enable_query_log
set global innodb_adaptive_hash_index=ON;
......@@ -66,9 +61,5 @@ drop view view0;
--disable_query_log
set global innodb_adaptive_hash_index = @old_innodb_adaptive_hash_index;
set global innodb_buffer_pool_size = @old_innodb_buffer_pool_size;
if (`select (version() like '%debug%') > 0`)
{
set global innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize;
}
--enable_query_log
--source include/wait_condition.inc
#
# WL6117 : Resize the InnoDB Buffer Pool Online
# (concurrent sql; allocation fail;)
#
--source include/have_innodb.inc
--source include/have_debug.inc
--disable_query_log
set @old_innodb_buffer_pool_size = @@innodb_buffer_pool_size;
set @old_innodb_file_per_table = @@innodb_file_per_table;
set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug;
set global innodb_disable_resize_buffer_pool_debug = OFF;
call mtr.add_suppression("\\[ERROR\\] InnoDB: failed to allocate memory for buffer pool chunk");
--enable_query_log
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
let $wait_timeout = 180;
set global innodb_file_per_table=ON;
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connect (con3,localhost,root,,);
connect (con4,localhost,root,,);
connect (con5,localhost,root,,);
connect (con6,localhost,root,,);
connect (con7,localhost,root,,);
connect (con8,localhost,root,,);
create table t2 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into t2 (c1, c2) values (1, 1);
create table t3 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into t3 (c1, c2) values (1, 1);
create table t4 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into t4 (c1, c2) values (1, 1);
create table t5 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into t5 (c1, c2) values (1, 1);
create table t6 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into t6 (c1, c2) values (1, 1);
create database test2;
create table test2.t7 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into test2.t7 (c1, c2) values (1, 1);
drop table test2.t7;
connection con1;
set @save_dbug=@@global.debug_dbug;
set global debug_dbug="+d,ib_buf_pool_resize_wait_before_resize";
set global innodb_buffer_pool_size = 12*1024*1024;
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 30) = 'Latching whole of buffer pool.'
FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
--source include/wait_condition.inc
# trying to update innodb_buffer_pool_size
--error ER_WRONG_ARGUMENTS
set global innodb_buffer_pool_size = 8*1024*1024;
select @@global.innodb_buffer_pool_size;
# trying to control adaptive hash index
select @@global.innodb_adaptive_hash_index;
set global innodb_adaptive_hash_index = ON;
select @@global.innodb_adaptive_hash_index;
set global innodb_adaptive_hash_index = OFF;
select @@global.innodb_adaptive_hash_index;
# - create table
--send create table t1 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB
connection con2;
# - analyze table
set use_stat_tables=never;
--send analyze table t2
connection con3;
# - alter table ... algorithm=inplace
--send alter table t3 algorithm=inplace, add index idx (c1)
connection con4;
# - alter table ... rename to
--send alter table t4 rename to t0
connection con5;
# - drop table
--send drop table t5
connection con6;
# - alter table ... discard tablespace
--send alter table t6 discard tablespace
connection con7;
# - drop database
--send drop database test2
connection con8;
# information schema INNODB_BUFFER_PAGE
--send select count(*) > 0 from information_schema.innodb_buffer_page
connection default;
set global debug_dbug=@save_dbug;
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 34) = 'Completed resizing buffer pool at '
FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
--source include/wait_condition.inc
connection con1;
--reap
connection con2;
--reap
connection con3;
--reap
connection con4;
--reap
connection con5;
--reap
connection con6;
--reap
connection con7;
--reap
connection con8;
--reap
connection default;
disconnect con3;
disconnect con4;
disconnect con5;
disconnect con6;
disconnect con7;
disconnect con8;
disconnect con1;
disconnect con2;
# fails to allocate new chunks
call mtr.add_suppression("\\[ERROR\\] InnoDB: buffer pool 0 : failed to allocate new memory.");
connection default;
set global debug_dbug="+d,ib_buf_chunk_init_fails";
set global innodb_buffer_pool_size = 16*1024*1024;
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 27) = 'Resizing buffer pool failed'
FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
--source include/wait_condition.inc
set global debug_dbug=@save_dbug;
# can be used as usual, even if failed to allocate
create table t8 (c1 int not null primary key, c2 int not null default 0) engine=InnoDB;
insert into t8 (c1, c2) values (1, 1);
drop table t8;
drop table t1;
drop table t2;
drop table t3;
drop table t0;
drop table t6;
--disable_query_log
set global innodb_buffer_pool_size = @old_innodb_buffer_pool_size;
set global innodb_file_per_table = @old_innodb_file_per_table;
set global innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize;
--enable_query_log
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 34) = 'Completed resizing buffer pool at '
FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
--source include/wait_condition.inc
# Wait till all disconnects are completed]
--source include/wait_until_count_sessions.inc
--echo #
--echo # BUG#23590280 NO WARNING WHEN REDUCING INNODB_BUFFER_POOL_SIZE INSIZE THE FIRST CHUNK
--echo #
set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug;
set global innodb_disable_resize_buffer_pool_debug = OFF;
set @before_innodb_buffer_pool_size = @@innodb_buffer_pool_size;
set global innodb_buffer_pool_size=@before_innodb_buffer_pool_size;
let $wait_timeout = 60;
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 19) = 'Size did not change'
FROM information_schema.global_status
WHERE VARIABLE_NAME = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
--source include/wait_condition.inc
set global innodb_buffer_pool_size=@before_innodb_buffer_pool_size * 2;
let $wait_timeout = 60;
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 9) = 'Completed'
FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
--source include/wait_condition.inc
set global innodb_buffer_pool_size=@before_innodb_buffer_pool_size;
let $wait_timeout = 60;
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 9) = 'Completed'
FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
--source include/wait_condition.inc
set global innodb_buffer_pool_size=@before_innodb_buffer_pool_size;
let $wait_timeout = 60;
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 19) = 'Size did not change'
FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
--source include/wait_condition.inc
SET GLOBAL innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize;
......@@ -3,10 +3,8 @@
--source include/have_debug.inc
SET @save_limit=@@GLOBAL.innodb_limit_optimistic_insert_debug;
SET @save_disable=@@GLOBAL.innodb_disable_resize_buffer_pool_debug;
SET @save_size=@@GLOBAL.innodb_buffer_pool_size;
SET GLOBAL innodb_limit_optimistic_insert_debug=2;
SET GLOBAL innodb_disable_resize_buffer_pool_debug=OFF;
SET GLOBAL innodb_buffer_pool_size=16777216;
......@@ -27,4 +25,3 @@ DROP TEMPORARY TABLE t1;
SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit;
SET GLOBAL innodb_buffer_pool_size=@save_size;
SET GLOBAL innodb_disable_resize_buffer_pool_debug=@save_disable;
......@@ -14,11 +14,6 @@ let $wait_condition =
--disable_query_log
set @old_innodb_buffer_pool_size = @@innodb_buffer_pool_size;
if (`select (version() like '%debug%') > 0`)
{
set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug;
set global innodb_disable_resize_buffer_pool_debug = OFF;
}
--enable_query_log
select @@innodb_buffer_pool_chunk_size;
......@@ -55,9 +50,5 @@ select @@innodb_buffer_pool_size;
--disable_query_log
set global innodb_buffer_pool_size = @old_innodb_buffer_pool_size;
if (`select (version() like '%debug%') > 0`)
{
set global innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize;
}
--enable_query_log
--source include/wait_condition.inc
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/big_test.inc
# Embedded server tests do not support restarting
--source include/not_embedded.inc
# This often fails under MSAN builder due timing differences
--source include/not_msan.inc
# The test does work with any page size, but we want to reduce the
# test running time by limiting the combinations. The redo log format
# is independent of the page size.
--source include/have_innodb_16k.inc
let $restart_noprint=2;
SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
SET GLOBAL innodb_dict_stats_disabled_debug = 1;
SET GLOBAL innodb_master_thread_disabled_debug = 1;
SET GLOBAL innodb_log_checkpoint_now = 1;
CREATE DATABASE very_long_database_name;
USE very_long_database_name;
let $i=1300;
--disable_query_log
while ($i)
{
eval CREATE TABLE veryLongTableNameToCreateMLOG_FILE_NAMErecords$i (a SERIAL)
ENGINE=InnoDB;
dec $i;
}
--enable_query_log
--let $_server_id= `SELECT @@server_id`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--exec echo "wait" > $_expect_file_name
SET debug_dbug = '+d,increase_mtr_checkpoint_size';
set global innodb_log_checkpoint_now = 1;
--let $restart_timeout=0
--source include/restart_mysqld.inc
DROP DATABASE very_long_database_name;
SET GLOBAL innodb_flush_sync=OFF;
SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
SET GLOBAL innodb_dict_stats_disabled_debug = 1;
SET GLOBAL innodb_master_thread_disabled_debug = 1;
SET GLOBAL innodb_log_checkpoint_now = 1;
--echo # Commit the multi-rec mini transaction if mtr size
--echo # exceeds LOG_CHECKPOINT_FREE_PER_THREAD size during checkpoint.
CREATE DATABASE very_long_database_name;
USE very_long_database_name;
let $i=1300;
--disable_query_log
while ($i)
{
eval CREATE TABLE veryLongTableNameToCreateMLOG_FILE_NAMErecords$i (a SERIAL)
ENGINE=InnoDB;
dec $i;
}
--enable_query_log
set global innodb_log_checkpoint_now = 1;
--let $restart_parameters = --debug-dbug=d,reduce_recv_parsing_buf
--source include/restart_mysqld.inc
DROP DATABASE very_long_database_name;
......@@ -417,9 +417,7 @@ insert into test.sanity values
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DATA_FILE_PATH"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DATA_HOME_DIR"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DEFAULT_ROW_FORMAT"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DICT_STATS_DISABLED_DEBUG"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DISABLE_BACKGROUND_MERGE"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DISABLE_RESIZE_BUFFER_POOL_DEBUG"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DISABLE_SORT_FILE_CACHE"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_DOUBLEWRITE"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_FAST_SHUTDOWN"),
......@@ -457,7 +455,6 @@ insert into test.sanity values
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LOG_GROUP_HOME_DIR"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LOG_WRITE_AHEAD_SIZE"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_LRU_SCAN_DEPTH"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MASTER_THREAD_DISABLED_DEBUG"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MAX_DIRTY_PAGES_PCT"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MAX_DIRTY_PAGES_PCT_LWM"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_MAX_PURGE_LAG"),
......@@ -475,7 +472,6 @@ insert into test.sanity values
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_OPEN_FILES"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_OPTIMIZE_FULLTEXT_ONLY"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_PAGE_CLEANERS"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_PAGE_CLEANER_DISABLED_DEBUG"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_PAGE_SIZE"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_PRINT_ALL_DEADLOCKS"),
("JUNK: GLOBAL-ONLY", "I_S.SESSION_VARIABLES", "INNODB_PURGE_BATCH_SIZE"),
......
#
# Basic test for innodb_disable_resize_buffer_pool_debug
#
SET @start_global_value = @@global.innodb_disable_resize_buffer_pool_debug;
SET @@global.innodb_disable_resize_buffer_pool_debug = 0;
SELECT @@global.innodb_disable_resize_buffer_pool_debug;
@@global.innodb_disable_resize_buffer_pool_debug
0
SET @@global.innodb_disable_resize_buffer_pool_debug ='On' ;
SELECT @@global.innodb_disable_resize_buffer_pool_debug;
@@global.innodb_disable_resize_buffer_pool_debug
1
SET @@global.innodb_disable_resize_buffer_pool_debug ='Off' ;
SELECT @@global.innodb_disable_resize_buffer_pool_debug;
@@global.innodb_disable_resize_buffer_pool_debug
0
SET @@global.innodb_disable_resize_buffer_pool_debug = 1;
SELECT @@global.innodb_disable_resize_buffer_pool_debug;
@@global.innodb_disable_resize_buffer_pool_debug
1
SELECT IF(@@GLOBAL.innodb_disable_resize_buffer_pool_debug,'ON','OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_disable_resize_buffer_pool_debug';
IF(@@GLOBAL.innodb_disable_resize_buffer_pool_debug,'ON','OFF') = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug);
COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_disable_resize_buffer_pool_debug';
COUNT(VARIABLE_VALUE)
1
1 Expected
SELECT @@innodb_disable_resize_buffer_pool_debug = @@GLOBAL.innodb_disable_resize_buffer_pool_debug;
@@innodb_disable_resize_buffer_pool_debug = @@GLOBAL.innodb_disable_resize_buffer_pool_debug
1
1 Expected
SELECT COUNT(@@innodb_disable_resize_buffer_pool_debug);
COUNT(@@innodb_disable_resize_buffer_pool_debug)
1
1 Expected
SELECT COUNT(@@local.innodb_disable_resize_buffer_pool_debug);
ERROR HY000: Variable 'innodb_disable_resize_buffer_pool_debug' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_disable_resize_buffer_pool_debug);
ERROR HY000: Variable 'innodb_disable_resize_buffer_pool_debug' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug);
COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug)
1
1 Expected
SELECT innodb_disable_resize_buffer_pool_debug = @@SESSION.innodb_disable_resize_buffer_pool_debug;
ERROR 42S22: Unknown column 'innodb_disable_resize_buffer_pool_debug' in 'field list'
SET @@global.innodb_disable_resize_buffer_pool_debug = @start_global_value;
SELECT @@global.innodb_disable_resize_buffer_pool_debug;
@@global.innodb_disable_resize_buffer_pool_debug
1
......@@ -607,30 +607,6 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DICT_STATS_DISABLED_DEBUG
SESSION_VALUE NULL
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Disable dict_stats thread
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_DISABLE_RESIZE_BUFFER_POOL_DEBUG
SESSION_VALUE NULL
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Disable resizing buffer pool to make assertion code not expensive.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_DISABLE_SORT_FILE_CACHE
SESSION_VALUE NULL
DEFAULT_VALUE OFF
......@@ -1279,18 +1255,6 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MASTER_THREAD_DISABLED_DEBUG
SESSION_VALUE NULL
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Disable master thread
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_MAX_DIRTY_PAGES_PCT
SESSION_VALUE NULL
DEFAULT_VALUE 90.000000
......@@ -1495,18 +1459,6 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_PAGE_CLEANER_DISABLED_DEBUG
SESSION_VALUE NULL
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Disable page cleaner
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_PAGE_SIZE
SESSION_VALUE NULL
DEFAULT_VALUE 16384
......
......@@ -24,13 +24,6 @@
--source include/have_innodb.inc
--disable_query_log
if (`select (version() like '%debug%') > 0`)
{
set global innodb_disable_resize_buffer_pool_debug = OFF;
}
--enable_query_log
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 34) = 'Completed resizing buffer pool at '
FROM information_schema.global_status
......
--echo #
--echo # Basic test for innodb_disable_resize_buffer_pool_debug
--echo #
--source include/have_innodb.inc
# The config variable is a debug variable
-- source include/have_debug.inc
SET @start_global_value = @@global.innodb_disable_resize_buffer_pool_debug;
# Check if Value can set
SET @@global.innodb_disable_resize_buffer_pool_debug = 0;
SELECT @@global.innodb_disable_resize_buffer_pool_debug;
SET @@global.innodb_disable_resize_buffer_pool_debug ='On' ;
SELECT @@global.innodb_disable_resize_buffer_pool_debug;
SET @@global.innodb_disable_resize_buffer_pool_debug ='Off' ;
SELECT @@global.innodb_disable_resize_buffer_pool_debug;
SET @@global.innodb_disable_resize_buffer_pool_debug = 1;
SELECT @@global.innodb_disable_resize_buffer_pool_debug;
# Check if the value in GLOBAL Table matches value in variable
--disable_warnings
SELECT IF(@@GLOBAL.innodb_disable_resize_buffer_pool_debug,'ON','OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_disable_resize_buffer_pool_debug';
--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug);
--echo 1 Expected
--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_disable_resize_buffer_pool_debug';
--enable_warnings
--echo 1 Expected
# Check if accessing variable with and without GLOBAL point to same variable
SELECT @@innodb_disable_resize_buffer_pool_debug = @@GLOBAL.innodb_disable_resize_buffer_pool_debug;
--echo 1 Expected
# Check if innodb_disable_resize_buffer_pool_debug can be accessed with and without @@ sign
SELECT COUNT(@@innodb_disable_resize_buffer_pool_debug);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.innodb_disable_resize_buffer_pool_debug);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.innodb_disable_resize_buffer_pool_debug);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug);
--echo 1 Expected
--Error ER_BAD_FIELD_ERROR
SELECT innodb_disable_resize_buffer_pool_debug = @@SESSION.innodb_disable_resize_buffer_pool_debug;
# Cleanup
SET @@global.innodb_disable_resize_buffer_pool_debug = @start_global_value;
SELECT @@global.innodb_disable_resize_buffer_pool_debug;
......@@ -333,9 +333,6 @@ buf_pool_t::chunk_t::map *buf_pool_t::chunk_t::map_reg;
buf_pool_t::chunk_t::map *buf_pool_t::chunk_t::map_ref;
#ifdef UNIV_DEBUG
/** Disable resizing buffer pool to make assertion code not expensive. */
my_bool buf_disable_resize_buffer_pool_debug = TRUE;
/** This is used to insert validation operations in execution
in the debug version */
static ulint buf_dbg_counter;
......
......@@ -83,10 +83,6 @@ static struct
ulint flush_pass;
} page_cleaner;
#ifdef UNIV_DEBUG
my_bool innodb_page_cleaner_disabled_debug;
#endif /* UNIV_DEBUG */
/* @} */
#ifdef UNIV_DEBUG
......@@ -2434,12 +2430,6 @@ static os_thread_ret_t DECLARE_THREAD(buf_flush_page_cleaner)(void*)
goto unemployed;
}
#ifdef UNIV_DEBUG
while (innodb_page_cleaner_disabled_debug && !buf_flush_sync_lsn &&
srv_shutdown_state == SRV_SHUTDOWN_NONE)
os_thread_sleep(100000);
#endif /* UNIV_DEBUG */
#ifndef DBUG_OFF
next:
#endif /* !DBUG_OFF */
......
......@@ -45,11 +45,6 @@ Created Apr 25, 2012 Vasil Dimov
#define MIN_RECALC_INTERVAL 10 /* seconds */
static void dict_stats_schedule(int ms);
#ifdef UNIV_DEBUG
/** Used by SET GLOBAL innodb_dict_stats_disabled_debug = 1; */
my_bool innodb_dict_stats_disabled_debug;
#endif /* UNIV_DEBUG */
/** This mutex protects the "recalc_pool" variable. */
static ib_mutex_t recalc_pool_mutex;
......@@ -416,21 +411,6 @@ static bool dict_stats_process_entry_from_recalc_pool()
return ret;
}
#ifdef UNIV_DEBUG
/** Disables dict stats thread. It's used by:
SET GLOBAL innodb_dict_stats_disabled_debug = 1 (0).
@param[in] save immediate result from check function */
void dict_stats_disabled_debug_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
const bool disable = *static_cast<const my_bool*>(save);
if (disable)
dict_stats_shutdown();
else
dict_stats_start();
}
#endif /* UNIV_DEBUG */
static tpool::timer* dict_stats_timer;
static std::mutex dict_stats_mutex;
......
......@@ -3668,12 +3668,6 @@ fil_names_clear(
bool do_write)
{
mtr_t mtr;
ulint mtr_checkpoint_size = RECV_SCAN_SIZE - 1;
DBUG_EXECUTE_IF(
"increase_mtr_checkpoint_size",
mtr_checkpoint_size = 75 * 1024;
);
mysql_mutex_assert_owner(&log_sys.mutex);
ut_ad(lsn);
......@@ -3683,8 +3677,8 @@ fil_names_clear(
for (fil_space_t* space = UT_LIST_GET_FIRST(fil_system.named_spaces);
space != NULL; ) {
if (mtr.get_log()->size()
+ (3 + 5 + 1) + strlen(space->chain.start->name)
>= mtr_checkpoint_size) {
+ strlen(space->chain.start->name)
>= RECV_SCAN_SIZE - (3 + 5 + 1)) {
/* Prevent log parse buffer overflow */
mtr.commit_files();
mtr.start();
......
......@@ -19838,32 +19838,10 @@ static MYSQL_SYSVAR_UINT(saved_page_number_debug,
"An InnoDB page number.",
NULL, NULL, 0, 0, UINT_MAX32, 0);
static MYSQL_SYSVAR_BOOL(disable_resize_buffer_pool_debug,
buf_disable_resize_buffer_pool_debug, PLUGIN_VAR_NOCMDARG,
"Disable resizing buffer pool to make assertion code not expensive.",
NULL, NULL, TRUE);
static MYSQL_SYSVAR_BOOL(page_cleaner_disabled_debug,
innodb_page_cleaner_disabled_debug, PLUGIN_VAR_OPCMDARG,
"Disable page cleaner",
NULL, NULL, FALSE);
static MYSQL_SYSVAR_BOOL(sync_debug, srv_sync_debug,
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
"Enable the sync debug checks",
NULL, NULL, FALSE);
static MYSQL_SYSVAR_BOOL(dict_stats_disabled_debug,
innodb_dict_stats_disabled_debug,
PLUGIN_VAR_OPCMDARG,
"Disable dict_stats thread",
NULL, dict_stats_disabled_debug_update, FALSE);
static MYSQL_SYSVAR_BOOL(master_thread_disabled_debug,
srv_master_thread_disabled_debug,
PLUGIN_VAR_OPCMDARG,
"Disable master thread",
NULL, srv_master_thread_disabled_debug_update, FALSE);
#endif /* UNIV_DEBUG */
static MYSQL_SYSVAR_BOOL(force_primary_key,
......@@ -20148,10 +20126,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(data_file_size_debug),
MYSQL_SYSVAR(fil_make_page_dirty_debug),
MYSQL_SYSVAR(saved_page_number_debug),
MYSQL_SYSVAR(disable_resize_buffer_pool_debug),
MYSQL_SYSVAR(page_cleaner_disabled_debug),
MYSQL_SYSVAR(dict_stats_disabled_debug),
MYSQL_SYSVAR(master_thread_disabled_debug),
MYSQL_SYSVAR(sync_debug),
#endif /* UNIV_DEBUG */
MYSQL_SYSVAR(force_primary_key),
......@@ -21157,21 +21131,6 @@ innodb_buffer_pool_size_validate(
return(1);
}
#ifdef UNIV_DEBUG
if (buf_disable_resize_buffer_pool_debug == TRUE) {
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_WRONG_ARGUMENTS,
"Cannot update innodb_buffer_pool_size,"
" because innodb_disable_resize_buffer_pool_debug"
" is set.");
ib::warn() << "Cannot update innodb_buffer_pool_size,"
" because innodb_disable_resize_buffer_pool_debug"
" is set.";
return(1);
}
#endif /* UNIV_DEBUG */
mysql_mutex_lock(&buf_pool.mutex);
if (srv_buf_pool_old_size != srv_buf_pool_size) {
......
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2021, MariaDB Corporation.
Copyright (c) 2013, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -74,11 +74,6 @@ the blocks on free list. If LRU list is very small then we can end up
in thrashing. */
#define BUF_LRU_MIN_LEN 256
# ifdef UNIV_DEBUG
extern my_bool buf_disable_resize_buffer_pool_debug; /*!< if TRUE, resizing
buffer pool is not allowed. */
# endif /* UNIV_DEBUG */
/** buf_page_t::state() values, distinguishing buf_page_t and buf_block_t */
enum buf_page_state
{
......
......@@ -40,13 +40,6 @@ extern ulint buf_lru_flush_page_count;
/** Flag indicating if the page_cleaner is in active state. */
extern bool buf_page_cleaner_is_active;
#ifdef UNIV_DEBUG
/** Value of MySQL global variable used to disable page cleaner. */
extern my_bool innodb_page_cleaner_disabled_debug;
#endif /* UNIV_DEBUG */
/** Remove all dirty pages belonging to a given tablespace when we are
deleting the data file of that tablespace.
The pages still remain a part of LRU and are evicted from
......
/*****************************************************************************
Copyright (c) 2012, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2019, MariaDB Corporation.
Copyright (c) 2017, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -34,11 +34,6 @@ Created Apr 26, 2012 Vasil Dimov
extern mysql_pfs_key_t dict_stats_recalc_pool_mutex_key;
#endif /* HAVE_PSI_INTERFACE */
#ifdef UNIV_DEBUG
/** Value of MySQL global used to disable dict_stats thread. */
extern my_bool innodb_dict_stats_disabled_debug;
#endif /* UNIV_DEBUG */
/*****************************************************************//**
Delete a given table from the auto recalc pool.
dict_stats_recalc_pool_del() */
......@@ -102,14 +97,6 @@ Free resources allocated by dict_stats_thread_init(), must be called
after dict_stats task has exited. */
void dict_stats_deinit();
#ifdef UNIV_DEBUG
/** Disables dict stats thread. It's used by:
SET GLOBAL innodb_dict_stats_disabled_debug = 1 (0).
@param[in] save immediate result from check function */
void dict_stats_disabled_debug_update(THD*, st_mysql_sys_var*, void*,
const void* save);
#endif /* UNIV_DEBUG */
/** Start the dict stats timer. */
void dict_stats_start();
......
......@@ -433,8 +433,6 @@ extern my_bool innodb_evict_tables_on_commit_debug;
extern my_bool srv_sync_debug;
extern my_bool srv_purge_view_update_only_debug;
/** Value of MySQL global used to disable master thread. */
extern my_bool srv_master_thread_disabled_debug;
/** InnoDB system tablespace to set during recovery */
extern uint srv_sys_space_size_debug;
/** whether redo log file has been created at startup */
......@@ -666,15 +664,6 @@ void srv_purge_shutdown();
/** Init purge tasks*/
void srv_init_purge_tasks();
#ifdef UNIV_DEBUG
/** Disables master thread. It's used by:
SET GLOBAL innodb_master_thread_disabled_debug = 1 (0).
@param[in] save immediate result from check function */
void
srv_master_thread_disabled_debug_update(THD*, st_mysql_sys_var*, void*,
const void* save);
#endif /* UNIV_DEBUG */
/** Status variables to be passed to MySQL */
struct export_var_t{
char innodb_buffer_pool_dump_status[OS_FILE_MAX_PATH + 128];/*!< Buf pool dump status */
......
......@@ -148,13 +148,6 @@ my_bool srv_use_atomic_writes;
/** innodb_compression_algorithm; used with page compression */
ulong innodb_compression_algorithm;
#ifdef UNIV_DEBUG
/** Used by SET GLOBAL innodb_master_thread_disabled_debug = X. */
my_bool srv_master_thread_disabled_debug;
/** Event used to inform that master thread is disabled. */
static os_event_t srv_master_thread_disabled_event;
#endif /* UNIV_DEBUG */
/*------------------------- LOG FILES ------------------------ */
char* srv_log_group_home_dir;
......@@ -659,7 +652,6 @@ static void srv_init()
}
need_srv_free = true;
ut_d(srv_master_thread_disabled_event = os_event_create(0));
/* page_zip_stat_per_index_mutex is acquired from:
1. page_zip_compress() (after SYNC_FSP)
......@@ -692,8 +684,6 @@ srv_free(void)
mutex_free(&srv_sys.tasks_mutex);
}
ut_d(os_event_destroy(srv_master_thread_disabled_event));
trx_i_s_cache_free(trx_i_s_cache);
srv_thread_pool_end();
}
......@@ -1552,54 +1542,6 @@ srv_shutdown_print_master_pending(
}
}
#ifdef UNIV_DEBUG
/** Waits in loop as long as master thread is disabled (debug) */
static
void
srv_master_do_disabled_loop(void)
{
if (!srv_master_thread_disabled_debug) {
/* We return here to avoid changing op_info. */
return;
}
srv_main_thread_op_info = "disabled";
while (srv_master_thread_disabled_debug) {
os_event_set(srv_master_thread_disabled_event);
if (srv_shutdown_state != SRV_SHUTDOWN_NONE) {
break;
}
os_thread_sleep(100000);
}
srv_main_thread_op_info = "";
}
/** Disables master thread. It's used by:
SET GLOBAL innodb_master_thread_disabled_debug = 1 (0).
@param[in] save immediate result from check function */
void
srv_master_thread_disabled_debug_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
/* This method is protected by mutex, as every SET GLOBAL .. */
ut_ad(srv_master_thread_disabled_event != NULL);
const bool disable = *static_cast<const my_bool*>(save);
const int64_t sig_count = os_event_reset(
srv_master_thread_disabled_event);
srv_master_thread_disabled_debug = disable;
if (disable) {
os_event_wait_low(
srv_master_thread_disabled_event, sig_count);
}
}
#endif /* UNIV_DEBUG */
/*********************************************************************//**
Perform the tasks that the master thread is supposed to do when the
server is active. There are two types of tasks. The first category is
......@@ -1630,8 +1572,6 @@ srv_master_do_active_tasks(void)
MONITOR_INC_TIME_IN_MICRO_SECS(
MONITOR_SRV_BACKGROUND_DROP_TABLE_MICROSECOND, counter_time);
ut_d(srv_master_do_disabled_loop());
if (srv_shutdown_state > SRV_SHUTDOWN_INITIATED) {
return;
}
......@@ -1694,8 +1634,6 @@ srv_master_do_idle_tasks(void)
MONITOR_SRV_BACKGROUND_DROP_TABLE_MICROSECOND,
counter_time);
ut_d(srv_master_do_disabled_loop());
if (srv_shutdown_state > SRV_SHUTDOWN_INITIATED) {
return;
}
......
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