diff options
39 files changed, 345 insertions, 1170 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 1a79068d5a5..650ab49fbcd 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -5376,7 +5376,6 @@ static bool xtrabackup_prepare_func(char** argv) xb_filters_init(); srv_log_group_home_dir = NULL; - srv_thread_concurrency = 1; if (xtrabackup_incremental) { srv_operation = SRV_OPERATION_RESTORE_DELTA; diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index 30b17c2e063..2ec0868c39e 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -1183,10 +1183,6 @@ set @my_innodb_autoextend_increment=@@global.innodb_autoextend_increment; set global innodb_autoextend_increment=8; set global innodb_autoextend_increment=@my_innodb_autoextend_increment; -set @my_innodb_commit_concurrency=@@global.innodb_commit_concurrency; -set global innodb_commit_concurrency=0; -set global innodb_commit_concurrency=@my_innodb_commit_concurrency; - # # Bug #37830: ORDER BY ASC/DESC - no difference # diff --git a/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result b/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result index f1faeb1d554..0dea25f6bf1 100644 --- a/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result +++ b/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result @@ -1,5 +1,4 @@ set global innodb_file_per_table=ON; -set global innodb_thread_concurrency=20; connect con1,localhost,root,,; connect con2,localhost,root,,; connect con3,localhost,root,,; diff --git a/mysql-test/suite/innodb/r/innodb_bug42101-nonzero.result b/mysql-test/suite/innodb/r/innodb_bug42101-nonzero.result deleted file mode 100644 index f43cb9da239..00000000000 --- a/mysql-test/suite/innodb/r/innodb_bug42101-nonzero.result +++ /dev/null @@ -1,26 +0,0 @@ -set global innodb_commit_concurrency=0; -ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '0' -select @@innodb_commit_concurrency; -@@innodb_commit_concurrency -1 -set global innodb_commit_concurrency=1; -select @@innodb_commit_concurrency; -@@innodb_commit_concurrency -1 -set global innodb_commit_concurrency=42; -select @@innodb_commit_concurrency; -@@innodb_commit_concurrency -42 -set global innodb_commit_concurrency=DEFAULT; -select @@innodb_commit_concurrency; -@@innodb_commit_concurrency -1 -set global innodb_commit_concurrency=0; -ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '0' -select @@innodb_commit_concurrency; -@@innodb_commit_concurrency -1 -set global innodb_commit_concurrency=1; -select @@innodb_commit_concurrency; -@@innodb_commit_concurrency -1 diff --git a/mysql-test/suite/innodb/r/innodb_bug42101.result b/mysql-test/suite/innodb/r/innodb_bug42101.result deleted file mode 100644 index 4e3367d5a54..00000000000 --- a/mysql-test/suite/innodb/r/innodb_bug42101.result +++ /dev/null @@ -1,22 +0,0 @@ -set global innodb_commit_concurrency=0; -select @@innodb_commit_concurrency; -@@innodb_commit_concurrency -0 -set global innodb_commit_concurrency=1; -ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '1' -select @@innodb_commit_concurrency; -@@innodb_commit_concurrency -0 -set global innodb_commit_concurrency=42; -ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '42' -select @@innodb_commit_concurrency; -@@innodb_commit_concurrency -0 -set global innodb_commit_concurrency=0; -select @@innodb_commit_concurrency; -@@innodb_commit_concurrency -0 -set global innodb_commit_concurrency=DEFAULT; -select @@innodb_commit_concurrency; -@@innodb_commit_concurrency -0 diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 31db0622fe1..595a56a8bef 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -1797,9 +1797,6 @@ DROP TABLE t1; set @my_innodb_autoextend_increment=@@global.innodb_autoextend_increment; set global innodb_autoextend_increment=8; set global innodb_autoextend_increment=@my_innodb_autoextend_increment; -set @my_innodb_commit_concurrency=@@global.innodb_commit_concurrency; -set global innodb_commit_concurrency=0; -set global innodb_commit_concurrency=@my_innodb_commit_concurrency; CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY (a), KEY t1_b (b)) ENGINE=InnoDB; INSERT INTO t1 (a,b,c) VALUES (1,1,1), (2,1,1), (3,1,1), (4,1,1); diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test index 6fd2cdc74d2..dfb4da3a63d 100644 --- a/mysql-test/suite/innodb/t/innodb.test +++ b/mysql-test/suite/innodb/t/innodb.test @@ -24,10 +24,6 @@ call mtr.add_suppression("Cannot add field .* in table .* because after adding i call mtr.add_suppression("\\[ERROR\\] InnoDB: in ALTER TABLE `test`.`t1`"); call mtr.add_suppression("\\[ERROR\\] InnoDB: in RENAME TABLE table `test`.`t1`"); -SET @innodb_thread_sleep_delay_orig = @@innodb_thread_sleep_delay; - -SET @innodb_thread_concurrency_orig = @@innodb_thread_concurrency; - --disable_warnings SET @innodb_rows_deleted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted'); SET @innodb_rows_inserted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted'); @@ -2503,9 +2499,6 @@ DROP TABLE bug35537; DISCONNECT c1; CONNECTION default; -SET GLOBAL innodb_thread_sleep_delay = @innodb_thread_sleep_delay_orig; -SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig; - -- enable_query_log # Clean up after the Bug#55284/Bug#58912 test case. diff --git a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test index 4f5ee089852..ddac64c17c9 100644 --- a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test +++ b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test @@ -9,8 +9,6 @@ --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_thread_concurrency = @@innodb_thread_concurrency; -set @old_innodb_thread_sleep_delay = @@innodb_thread_sleep_delay; 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"); @@ -22,7 +20,6 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: failed to allocate memory for buff let $wait_timeout = 180; set global innodb_file_per_table=ON; -set global innodb_thread_concurrency=20; connect (con1,localhost,root,,); connect (con2,localhost,root,,); @@ -178,8 +175,6 @@ 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_thread_concurrency = @old_innodb_thread_concurrency; -set global innodb_thread_sleep_delay = @old_innodb_thread_sleep_delay; set global innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize; --enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb_bug42101-nonzero-master.opt b/mysql-test/suite/innodb/t/innodb_bug42101-nonzero-master.opt deleted file mode 100644 index e82f614c897..00000000000 --- a/mysql-test/suite/innodb/t/innodb_bug42101-nonzero-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb-commit-concurrency=1 diff --git a/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test b/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test deleted file mode 100644 index 3ee3f1e6a8b..00000000000 --- a/mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test +++ /dev/null @@ -1,20 +0,0 @@ ---source include/have_innodb.inc -# -# Bug#42101 Race condition in innodb_commit_concurrency -# http://bugs.mysql.com/42101 -# - ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_commit_concurrency=0; -select @@innodb_commit_concurrency; -set global innodb_commit_concurrency=1; -select @@innodb_commit_concurrency; -set global innodb_commit_concurrency=42; -select @@innodb_commit_concurrency; -set global innodb_commit_concurrency=DEFAULT; -select @@innodb_commit_concurrency; ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_commit_concurrency=0; -select @@innodb_commit_concurrency; -set global innodb_commit_concurrency=1; -select @@innodb_commit_concurrency; diff --git a/mysql-test/suite/innodb/t/innodb_bug42101.test b/mysql-test/suite/innodb/t/innodb_bug42101.test deleted file mode 100644 index 374d3e6b5f5..00000000000 --- a/mysql-test/suite/innodb/t/innodb_bug42101.test +++ /dev/null @@ -1,18 +0,0 @@ ---source include/have_innodb.inc -# -# Bug#42101 Race condition in innodb_commit_concurrency -# http://bugs.mysql.com/42101 -# - -set global innodb_commit_concurrency=0; -select @@innodb_commit_concurrency; ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_commit_concurrency=1; -select @@innodb_commit_concurrency; ---error ER_WRONG_VALUE_FOR_VAR -set global innodb_commit_concurrency=42; -select @@innodb_commit_concurrency; -set global innodb_commit_concurrency=0; -select @@innodb_commit_concurrency; -set global innodb_commit_concurrency=DEFAULT; -select @@innodb_commit_concurrency; diff --git a/mysql-test/suite/rpl/r/rpl_sync_with_innodb_thd_conc.result b/mysql-test/suite/rpl/r/rpl_sync_with_innodb_thd_conc.result deleted file mode 100644 index cd9ac1db9b1..00000000000 --- a/mysql-test/suite/rpl/r/rpl_sync_with_innodb_thd_conc.result +++ /dev/null @@ -1,18 +0,0 @@ -include/master-slave.inc -[connection master] -connection slave; -SET @old_innodb_thread_concurrency := @@innodb_thread_concurrency; -SET @old_innodb_thread_sleep_delay := @@innodb_thread_sleep_delay; -SET GLOBAL innodb_thread_concurrency = 100; -connection master; -CREATE TABLE t(f INT) ENGINE=INNODB; -INSERT INTO t VALUES (10); -connection slave; -include/diff_tables.inc [master:t, slave:t] -"===== Clean up=======" -connection master; -DROP TABLE t; -connection slave; -SET GLOBAL innodb_thread_concurrency = @old_innodb_thread_concurrency; -SET GLOBAL innodb_thread_sleep_delay = @old_innodb_thread_sleep_delay; -include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_sync_with_innodb_thd_conc.test b/mysql-test/suite/rpl/t/rpl_sync_with_innodb_thd_conc.test deleted file mode 100644 index b4c2971d2fb..00000000000 --- a/mysql-test/suite/rpl/t/rpl_sync_with_innodb_thd_conc.test +++ /dev/null @@ -1,41 +0,0 @@ -# ==== Purpose ==== -# -# Test verifies that replication shouldn't hang when number of active threads -# on the slave server are less than the allowed innodb_thread_concurrency value. -# -# ==== Implementation ==== -# -# Steps: -# 0 - Have master slave replication setup with engine being Innodb. -# 1 - Configure innodb_thread_concurrency = 100. -# 2 - Do some DML on master and sync the slave with master. -# 3 - Ensure replication doesn't hang. -# -# ==== References ==== -# -# MDEV-20247: Replication hangs with "preparing" and never starts -# - ---source include/master-slave.inc ---source include/have_innodb.inc - ---connection slave -SET @old_innodb_thread_concurrency := @@innodb_thread_concurrency; -SET @old_innodb_thread_sleep_delay := @@innodb_thread_sleep_delay; -SET GLOBAL innodb_thread_concurrency = 100; - ---connection master -CREATE TABLE t(f INT) ENGINE=INNODB; -INSERT INTO t VALUES (10); ---sync_slave_with_master - ---let $diff_tables=master:t, slave:t ---source include/diff_tables.inc - ---echo "===== Clean up=======" ---connection master -DROP TABLE t; ---sync_slave_with_master -SET GLOBAL innodb_thread_concurrency = @old_innodb_thread_concurrency; -SET GLOBAL innodb_thread_sleep_delay = @old_innodb_thread_sleep_delay; ---source include/rpl_end.inc diff --git a/mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result b/mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result index b3ba28a4411..c5f468a7427 100644 --- a/mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result @@ -1,37 +1,48 @@ SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay; @@GLOBAL.innodb_adaptive_max_sleep_delay -150000 +0 150000 Expected SET @@GLOBAL.innodb_adaptive_max_sleep_delay=100; +Warnings: +Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect. SET @@GLOBAL.innodb_adaptive_max_sleep_delay=0; +Warnings: +Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect. SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay; @@GLOBAL.innodb_adaptive_max_sleep_delay 0 SET @@GLOBAL.innodb_adaptive_max_sleep_delay=100000; +Warnings: +Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect. SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay; @@GLOBAL.innodb_adaptive_max_sleep_delay -100000 +0 SET @@GLOBAL.innodb_adaptive_max_sleep_delay=1000000; +Warnings: +Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect. SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay; @@GLOBAL.innodb_adaptive_max_sleep_delay -1000000 +0 SET @@GLOBAL.innodb_adaptive_max_sleep_delay=1000001; Warnings: Warning 1292 Truncated incorrect innodb_adaptive_max_sleep_delay value: '1000001' +Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect. SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay; @@GLOBAL.innodb_adaptive_max_sleep_delay -1000000 +0 1000000 Expected SET @@GLOBAL.innodb_adaptive_max_sleep_delay=4294967295; Warnings: Warning 1292 Truncated incorrect innodb_adaptive_max_sleep_delay value: '4294967295' +Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect. SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay; @@GLOBAL.innodb_adaptive_max_sleep_delay -1000000 +0 1000000 Expected SET @@GLOBAL.innodb_adaptive_max_sleep_delay=-1; Warnings: Warning 1292 Truncated incorrect innodb_adaptive_max_sleep_delay value: '-1' +Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect. SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay; @@GLOBAL.innodb_adaptive_max_sleep_delay 0 @@ -39,6 +50,7 @@ SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay; SET @@GLOBAL.innodb_adaptive_max_sleep_delay=-1024; Warnings: Warning 1292 Truncated incorrect innodb_adaptive_max_sleep_delay value: '-1024' +Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect. SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay; @@GLOBAL.innodb_adaptive_max_sleep_delay 0 @@ -70,3 +82,5 @@ Expected error 'Variable is a GLOBAL variable' SELECT innodb_adaptive_max_sleep_delay = @@SESSION.innodb_adaptive_max_sleep_delay; ERROR 42S22: Unknown column 'innodb_adaptive_max_sleep_delay' in 'field list' SET @@GLOBAL.innodb_adaptive_max_sleep_delay=150000; +Warnings: +Warning 138 The parameter innodb_adaptive_max_sleep_delay is deprecated and has no effect. diff --git a/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result b/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result index 474818829c5..3c1f6a7d2aa 100644 --- a/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result @@ -4,35 +4,49 @@ SELECT @global_start_value; 0 '#--------------------FN_DYNVARS_046_01------------------------#' SET @@global.innodb_commit_concurrency = 0; +Warnings: +Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect. SET @@global.innodb_commit_concurrency = DEFAULT; +Warnings: +Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect. SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency 0 '#---------------------FN_DYNVARS_046_02-------------------------#' SET innodb_commit_concurrency = 1; ERROR HY000: Variable 'innodb_commit_concurrency' is a GLOBAL variable and should be set with SET GLOBAL +SET GLOBAL innodb_commit_concurrency = 1; +Warnings: +Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect. SELECT @@innodb_commit_concurrency; @@innodb_commit_concurrency 0 SELECT local.innodb_commit_concurrency; ERROR 42S02: Unknown table 'local' in field list SET global innodb_commit_concurrency = 0; +Warnings: +Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect. SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency 0 '#--------------------FN_DYNVARS_046_03------------------------#' SET @@global.innodb_commit_concurrency = 0; +Warnings: +Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect. SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency 0 '#--------------------FN_DYNVARS_046_04-------------------------#' -SET @@global.innodb_commit_concurrency = 1; -ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '1' +SELECT @@global.innodb_commit_concurrency; +@@global.innodb_commit_concurrency +0 SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency 0 SET @@global.innodb_commit_concurrency = -1; -ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '-1' +Warnings: +Warning 1292 Truncated incorrect innodb_commit_concurrency value: '-1' +Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect. SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency 0 @@ -52,7 +66,9 @@ SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency 0 SET @@global.innodb_commit_concurrency = 1001; -ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '1001' +Warnings: +Warning 1292 Truncated incorrect innodb_commit_concurrency value: '1001' +Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect. SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency 0 @@ -82,6 +98,8 @@ SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency 0 SET @@global.innodb_commit_concurrency = @global_start_value; +Warnings: +Warning 138 The parameter innodb_commit_concurrency is deprecated and has no effect. SELECT @@global.innodb_commit_concurrency; @@global.innodb_commit_concurrency 0 diff --git a/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result b/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result index dd4488a97b3..5d35833dd88 100644 --- a/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result @@ -1,93 +1,103 @@ SET @global_start_value = @@global.innodb_concurrency_tickets; SELECT @global_start_value; @global_start_value -5000 +0 '#--------------------FN_DYNVARS_046_01------------------------#' SET @@global.innodb_concurrency_tickets = 0; Warnings: -Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0' +Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect. SET @@global.innodb_concurrency_tickets = DEFAULT; +Warnings: +Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect. SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -5000 +0 '#---------------------FN_DYNVARS_046_02-------------------------#' SET innodb_concurrency_tickets = 1; ERROR HY000: Variable 'innodb_concurrency_tickets' is a GLOBAL variable and should be set with SET GLOBAL SELECT @@innodb_concurrency_tickets; @@innodb_concurrency_tickets -5000 +0 SELECT local.innodb_concurrency_tickets; ERROR 42S02: Unknown table 'local' in field list SET global innodb_concurrency_tickets = 0; Warnings: -Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0' +Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect. SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 '#--------------------FN_DYNVARS_046_03------------------------#' SET @@global.innodb_concurrency_tickets = 1; +Warnings: +Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect. SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 SET @@global.innodb_concurrency_tickets = 1000; +Warnings: +Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect. SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1000 +0 SET @@global.innodb_concurrency_tickets = 4294967295; +Warnings: +Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect. SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -4294967295 +0 '#--------------------FN_DYNVARS_046_04-------------------------#' SET @@global.innodb_concurrency_tickets = 4294967296; SELECT @@global.innodb_concurrency_tickets IN (4294967296,4294967295); @@global.innodb_concurrency_tickets IN (4294967296,4294967295) -1 +0 SET @@global.innodb_concurrency_tickets = 12345678901; SELECT @@global.innodb_concurrency_tickets IN (12345678901,4294967295); @@global.innodb_concurrency_tickets IN (12345678901,4294967295) -1 +0 SET @@global.innodb_concurrency_tickets = 18446744073709551615; SELECT @@global.innodb_concurrency_tickets IN (18446744073709551615,4294967295); @@global.innodb_concurrency_tickets IN (18446744073709551615,4294967295) -1 +0 '#--------------------FN_DYNVARS_046_05-------------------------#' SET @@global.innodb_concurrency_tickets = -1; Warnings: Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '-1' +Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect. SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 SET @@global.innodb_concurrency_tickets = -1024; Warnings: Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '-1024' +Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect. SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 SET @@global.innodb_concurrency_tickets = "T"; ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets' SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 SET @@global.innodb_concurrency_tickets = "Y"; ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets' SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 SET @@global.innodb_concurrency_tickets = 1.1; ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets' SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 SET @@global.innodb_concurrency_tickets = " "; ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets' SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 SET @@global.innodb_concurrency_tickets = ' '; ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets' SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 '#----------------------FN_DYNVARS_046_06------------------------#' SELECT @@global.innodb_concurrency_tickets = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES @@ -97,34 +107,38 @@ VARIABLE_VALUE 1 SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_concurrency_tickets'; VARIABLE_VALUE -1 +0 '#---------------------FN_DYNVARS_046_07-------------------------#' SET @@global.innodb_concurrency_tickets = OFF; ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets' SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 SET @@global.innodb_concurrency_tickets = ON; ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets' SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 '#---------------------FN_DYNVARS_046_08----------------------#' SET @@global.innodb_concurrency_tickets = TRUE; +Warnings: +Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect. SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 SET @@global.innodb_concurrency_tickets = FALSE; Warnings: -Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0' +Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect. SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -1 +0 SET @@global.innodb_concurrency_tickets = @global_start_value; +Warnings: +Warning 138 The parameter innodb_concurrency_tickets is deprecated and has no effect. SELECT @@global.innodb_concurrency_tickets; @@global.innodb_concurrency_tickets -5000 +0 diff --git a/mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result b/mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result index 5e0fb425f6b..53a499ff34b 100644 --- a/mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result @@ -24,33 +24,43 @@ select * from information_schema.session_variables where variable_name='innodb_r VARIABLE_NAME VARIABLE_VALUE INNODB_REPLICATION_DELAY 0 set global innodb_replication_delay=10; +Warnings: +Warning 138 The parameter innodb_replication_delay is deprecated and has no effect. select @@global.innodb_replication_delay; @@global.innodb_replication_delay -10 +0 select * from information_schema.global_variables where variable_name='innodb_replication_delay'; VARIABLE_NAME VARIABLE_VALUE -INNODB_REPLICATION_DELAY 10 +INNODB_REPLICATION_DELAY 0 select * from information_schema.session_variables where variable_name='innodb_replication_delay'; VARIABLE_NAME VARIABLE_VALUE -INNODB_REPLICATION_DELAY 10 +INNODB_REPLICATION_DELAY 0 set session innodb_replication_delay=1; ERROR HY000: Variable 'innodb_replication_delay' is a GLOBAL variable and should be set with SET GLOBAL set global innodb_replication_delay=DEFAULT; +Warnings: +Warning 138 The parameter innodb_replication_delay is deprecated and has no effect. select @@global.innodb_replication_delay; @@global.innodb_replication_delay 0 set global innodb_replication_delay=0; +Warnings: +Warning 138 The parameter innodb_replication_delay is deprecated and has no effect. select @@global.innodb_replication_delay; @@global.innodb_replication_delay 0 set global innodb_replication_delay=65535; +Warnings: +Warning 138 The parameter innodb_replication_delay is deprecated and has no effect. select @@global.innodb_replication_delay; @@global.innodb_replication_delay -65535 +0 set global innodb_replication_delay=4294967295; +Warnings: +Warning 138 The parameter innodb_replication_delay is deprecated and has no effect. select @@global.innodb_replication_delay; @@global.innodb_replication_delay -4294967295 +0 set global innodb_replication_delay=1.1; ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay' set global innodb_replication_delay=1e1; @@ -61,21 +71,23 @@ set global innodb_replication_delay=' '; ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay' select @@global.innodb_replication_delay; @@global.innodb_replication_delay -4294967295 +0 set global innodb_replication_delay=" "; ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay' select @@global.innodb_replication_delay; @@global.innodb_replication_delay -4294967295 +0 set global innodb_replication_delay=-7; Warnings: Warning 1292 Truncated incorrect innodb_replication_delay value: '-7' +Warning 138 The parameter innodb_replication_delay is deprecated and has no effect. select @@global.innodb_replication_delay; @@global.innodb_replication_delay 0 set global innodb_replication_delay=-1024; Warnings: Warning 1292 Truncated incorrect innodb_replication_delay value: '-1024' +Warning 138 The parameter innodb_replication_delay is deprecated and has no effect. select @@global.innodb_replication_delay; @@global.innodb_replication_delay 0 @@ -85,16 +97,18 @@ INNODB_REPLICATION_DELAY 0 SET @@global.innodb_replication_delay = 4294967296; SELECT @@global.innodb_replication_delay IN (4294967296,4294967295); @@global.innodb_replication_delay IN (4294967296,4294967295) -1 +0 SET @@global.innodb_replication_delay = 12345678901; SELECT @@global.innodb_replication_delay IN (12345678901,4294967295); @@global.innodb_replication_delay IN (12345678901,4294967295) -1 +0 SET @@global.innodb_replication_delay = 18446744073709551615; SELECT @@global.innodb_replication_delay IN (18446744073709551615,4294967295); @@global.innodb_replication_delay IN (18446744073709551615,4294967295) -1 +0 SET @@global.innodb_replication_delay = @start_global_value; +Warnings: +Warning 138 The parameter innodb_replication_delay is deprecated and has no effect. SELECT @@global.innodb_replication_delay; @@global.innodb_replication_delay 0 diff --git a/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result b/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result index ca3c253604a..39d1a659a20 100644 --- a/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result @@ -4,7 +4,11 @@ SELECT @global_start_value; 0 '#--------------------FN_DYNVARS_046_01------------------------#' SET @@global.innodb_thread_concurrency = 0; +Warnings: +Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect. SET @@global.innodb_thread_concurrency = DEFAULT; +Warnings: +Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect. SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency 0 @@ -17,26 +21,35 @@ SELECT @@innodb_thread_concurrency; SELECT local.innodb_thread_concurrency; ERROR 42S02: Unknown table 'local' in field list SET global innodb_thread_concurrency = 0; +Warnings: +Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect. SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency 0 '#--------------------FN_DYNVARS_046_03------------------------#' SET @@global.innodb_thread_concurrency = 0; +Warnings: +Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect. SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency 0 SET @@global.innodb_thread_concurrency = 1; +Warnings: +Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect. SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency -1 +0 SET @@global.innodb_thread_concurrency = 1000; +Warnings: +Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect. SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency -1000 +0 '#--------------------FN_DYNVARS_046_04-------------------------#' SET @@global.innodb_thread_concurrency = -1; Warnings: Warning 1292 Truncated incorrect innodb_thread_concurrency value: '-1' +Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect. SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency 0 @@ -63,14 +76,15 @@ SELECT @@global.innodb_thread_concurrency; SET @@global.innodb_thread_concurrency = 1001; Warnings: Warning 1292 Truncated incorrect innodb_thread_concurrency value: '1001' +Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect. SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency -1000 +0 SET @@global.innodb_thread_concurrency = 255.01; ERROR 42000: Incorrect argument type to variable 'innodb_thread_concurrency' SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency -1000 +0 '#----------------------FN_DYNVARS_046_05------------------------#' SELECT @@global.innodb_thread_concurrency = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES @@ -80,32 +94,38 @@ VARIABLE_VALUE 1 SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency -1000 +0 SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_thread_concurrency'; VARIABLE_VALUE -1000 +0 '#---------------------FN_DYNVARS_046_06-------------------------#' SET @@global.innodb_thread_concurrency = OFF; ERROR 42000: Incorrect argument type to variable 'innodb_thread_concurrency' SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency -1000 +0 SET @@global.innodb_thread_concurrency = ON; ERROR 42000: Incorrect argument type to variable 'innodb_thread_concurrency' SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency -1000 +0 '#---------------------FN_DYNVARS_046_07----------------------#' SET @@global.innodb_thread_concurrency = TRUE; +Warnings: +Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect. SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency -1 +0 SET @@global.innodb_thread_concurrency = FALSE; +Warnings: +Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect. SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency 0 SET @@global.innodb_thread_concurrency = @global_start_value; +Warnings: +Warning 138 The parameter innodb_thread_concurrency is deprecated and has no effect. SELECT @@global.innodb_thread_concurrency; @@global.innodb_thread_concurrency 0 diff --git a/mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result b/mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result index c2017ee0b66..b6310bb5652 100644 --- a/mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result @@ -1,38 +1,40 @@ SET @start_global_value = @@global.innodb_thread_sleep_delay; SELECT @start_global_value; @start_global_value -10000 +0 Valid values are zero or above select @@global.innodb_thread_sleep_delay >=0; @@global.innodb_thread_sleep_delay >=0 1 select @@global.innodb_thread_sleep_delay; @@global.innodb_thread_sleep_delay -10000 +0 select @@session.innodb_thread_sleep_delay; ERROR HY000: Variable 'innodb_thread_sleep_delay' is a GLOBAL variable show global variables like 'innodb_thread_sleep_delay'; Variable_name Value -innodb_thread_sleep_delay 10000 +innodb_thread_sleep_delay 0 show session variables like 'innodb_thread_sleep_delay'; Variable_name Value -innodb_thread_sleep_delay 10000 +innodb_thread_sleep_delay 0 select * from information_schema.global_variables where variable_name='innodb_thread_sleep_delay'; VARIABLE_NAME VARIABLE_VALUE -INNODB_THREAD_SLEEP_DELAY 10000 +INNODB_THREAD_SLEEP_DELAY 0 select * from information_schema.session_variables where variable_name='innodb_thread_sleep_delay'; VARIABLE_NAME VARIABLE_VALUE -INNODB_THREAD_SLEEP_DELAY 10000 +INNODB_THREAD_SLEEP_DELAY 0 set global innodb_thread_sleep_delay=10; +Warnings: +Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect. select @@global.innodb_thread_sleep_delay; @@global.innodb_thread_sleep_delay -10 +0 select * from information_schema.global_variables where variable_name='innodb_thread_sleep_delay'; VARIABLE_NAME VARIABLE_VALUE -INNODB_THREAD_SLEEP_DELAY 10 +INNODB_THREAD_SLEEP_DELAY 0 select * from information_schema.session_variables where variable_name='innodb_thread_sleep_delay'; VARIABLE_NAME VARIABLE_VALUE -INNODB_THREAD_SLEEP_DELAY 10 +INNODB_THREAD_SLEEP_DELAY 0 set session innodb_thread_sleep_delay=1; ERROR HY000: Variable 'innodb_thread_sleep_delay' is a GLOBAL variable and should be set with SET GLOBAL set global innodb_thread_sleep_delay=1.1; @@ -45,9 +47,11 @@ set global innodb_thread_sleep_delay=18446744073709551616; Warnings: Warning 1916 Got overflow when converting '18446744073709551616' to INT. Value truncated Warning 1292 Truncated incorrect innodb_thread_sleep_delay value: '9223372036854775807' +Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect. set global innodb_thread_sleep_delay=-7; Warnings: Warning 1292 Truncated incorrect innodb_thread_sleep_delay value: '-7' +Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect. select @@global.innodb_thread_sleep_delay; @@global.innodb_thread_sleep_delay 0 @@ -55,34 +59,46 @@ select * from information_schema.global_variables where variable_name='innodb_th VARIABLE_NAME VARIABLE_VALUE INNODB_THREAD_SLEEP_DELAY 0 set global innodb_thread_sleep_delay=0; +Warnings: +Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect. select @@global.innodb_thread_sleep_delay; @@global.innodb_thread_sleep_delay 0 set global innodb_thread_sleep_delay=1000; +Warnings: +Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect. select @@global.innodb_thread_sleep_delay; @@global.innodb_thread_sleep_delay -1000 +0 set global innodb_thread_sleep_delay=1000000; +Warnings: +Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect. select @@global.innodb_thread_sleep_delay; @@global.innodb_thread_sleep_delay -1000000 +0 set global innodb_thread_sleep_delay=1000001; Warnings: Warning 1292 Truncated incorrect innodb_thread_sleep_delay value: '1000001' +Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect. select @@global.innodb_thread_sleep_delay; @@global.innodb_thread_sleep_delay -1000000 +0 set global innodb_thread_sleep_delay=4294967295; Warnings: Warning 1292 Truncated incorrect innodb_thread_sleep_delay value: '4294967295' +Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect. select @@global.innodb_thread_sleep_delay; @@global.innodb_thread_sleep_delay -1000000 +0 set global innodb_thread_sleep_delay=555; +Warnings: +Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect. select @@global.innodb_thread_sleep_delay; @@global.innodb_thread_sleep_delay -555 +0 SET @@global.innodb_thread_sleep_delay = @start_global_value; +Warnings: +Warning 138 The parameter innodb_thread_sleep_delay is deprecated and has no effect. SELECT @@global.innodb_thread_sleep_delay; @@global.innodb_thread_sleep_delay -10000 +0 diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff index 84aecf2ce36..2f39a472b99 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff @@ -9,15 +9,6 @@ VARIABLE_COMMENT Number of InnoDB Adaptive Hash Index Partitions (default 8) NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 512 -@@ -61,7 +61,7 @@ - SESSION_VALUE NULL - DEFAULT_VALUE 150000 - VARIABLE_SCOPE GLOBAL --VARIABLE_TYPE BIGINT UNSIGNED -+VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it. - NUMERIC_MIN_VALUE 0 - NUMERIC_MAX_VALUE 1000000 @@ -73,7 +73,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 64 @@ -76,16 +67,7 @@ VARIABLE_COMMENT A number between [0, 100] that tells how oftern buffer pool dump status in percentages should be printed. E.g. 10 means that buffer pool dump status is printed when every 10% of number of buffer pool pages are dumped. Default is 0 (only start and end status is printed). NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 100 -@@ -373,7 +373,7 @@ - SESSION_VALUE NULL - DEFAULT_VALUE 0 - VARIABLE_SCOPE GLOBAL --VARIABLE_TYPE BIGINT UNSIGNED -+VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. - NUMERIC_MIN_VALUE 0 - NUMERIC_MAX_VALUE 1000 -@@ -409,7 +409,7 @@ +@@ -421,7 +421,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 5 VARIABLE_SCOPE GLOBAL @@ -94,7 +76,7 @@ VARIABLE_COMMENT If the compression failure rate of a table is greater than this number more padding is added to the pages to reduce the failures. A value of zero implies no padding NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 100 -@@ -433,7 +433,7 @@ +@@ -445,7 +445,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 50 VARIABLE_SCOPE GLOBAL @@ -103,20 +85,7 @@ VARIABLE_COMMENT Percentage of empty space on a data page that can be reserved to make the page compressible. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 75 -@@ -445,10 +445,10 @@ - SESSION_VALUE NULL - DEFAULT_VALUE 5000 - VARIABLE_SCOPE GLOBAL --VARIABLE_TYPE BIGINT UNSIGNED -+VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket - NUMERIC_MIN_VALUE 1 --NUMERIC_MAX_VALUE 18446744073709551615 -+NUMERIC_MAX_VALUE 4294967295 - NUMERIC_BLOCK_SIZE 0 - ENUM_VALUE_LIST NULL - READ_ONLY NO -@@ -673,7 +673,7 @@ +@@ -661,7 +661,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 120 VARIABLE_SCOPE GLOBAL @@ -125,7 +94,7 @@ VARIABLE_COMMENT Number of pages reserved in doublewrite buffer for batch flushing NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 127 -@@ -769,7 +769,7 @@ +@@ -757,7 +757,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 600 VARIABLE_SCOPE GLOBAL @@ -134,7 +103,7 @@ VARIABLE_COMMENT Maximum number of seconds that semaphore times out in InnoDB. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -817,7 +817,7 @@ +@@ -805,7 +805,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -143,7 +112,7 @@ VARIABLE_COMMENT Make the first page of the given tablespace dirty. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -829,7 +829,7 @@ +@@ -817,7 +817,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 30 VARIABLE_SCOPE GLOBAL @@ -152,7 +121,7 @@ VARIABLE_COMMENT Number of iterations over which the background flushing is averaged. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1000 -@@ -853,7 +853,7 @@ +@@ -841,7 +841,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL @@ -161,7 +130,7 @@ VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 3 -@@ -877,7 +877,7 @@ +@@ -865,7 +865,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL @@ -170,7 +139,7 @@ VARIABLE_COMMENT Set to 0 (don't flush neighbors from buffer pool), 1 (flush contiguous neighbors from buffer pool) or 2 (flush neighbors from buffer pool), when flushing a block NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 2 -@@ -925,7 +925,7 @@ +@@ -913,7 +913,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -179,7 +148,7 @@ VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt. Value 5 can return bogus data, and 6 can permanently corrupt data. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 6 -@@ -949,7 +949,7 @@ +@@ -937,7 +937,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 8000000 VARIABLE_SCOPE GLOBAL @@ -188,7 +157,7 @@ VARIABLE_COMMENT InnoDB Fulltext search cache size in bytes NUMERIC_MIN_VALUE 1600000 NUMERIC_MAX_VALUE 80000000 -@@ -985,7 +985,7 @@ +@@ -973,7 +973,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 84 VARIABLE_SCOPE GLOBAL @@ -197,7 +166,7 @@ VARIABLE_COMMENT InnoDB Fulltext search maximum token size in characters NUMERIC_MIN_VALUE 10 NUMERIC_MAX_VALUE 84 -@@ -997,7 +997,7 @@ +@@ -985,7 +985,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 3 VARIABLE_SCOPE GLOBAL @@ -206,7 +175,7 @@ VARIABLE_COMMENT InnoDB Fulltext search minimum token size in characters NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 16 -@@ -1009,7 +1009,7 @@ +@@ -997,7 +997,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 2000 VARIABLE_SCOPE GLOBAL @@ -215,7 +184,7 @@ VARIABLE_COMMENT InnoDB Fulltext search number of words to optimize for each optimize table call NUMERIC_MIN_VALUE 1000 NUMERIC_MAX_VALUE 10000 -@@ -1021,10 +1021,10 @@ +@@ -1009,10 +1009,10 @@ SESSION_VALUE NULL DEFAULT_VALUE 2000000000 VARIABLE_SCOPE GLOBAL @@ -228,7 +197,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1045,7 +1045,7 @@ +@@ -1033,7 +1033,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 2 VARIABLE_SCOPE GLOBAL @@ -237,7 +206,7 @@ VARIABLE_COMMENT InnoDB Fulltext search parallel sort degree, will round up to nearest power of 2 number NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 16 -@@ -1057,7 +1057,7 @@ +@@ -1045,7 +1045,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 640000000 VARIABLE_SCOPE GLOBAL @@ -246,7 +215,7 @@ VARIABLE_COMMENT Total memory allocated for InnoDB Fulltext Search cache NUMERIC_MIN_VALUE 32000000 NUMERIC_MAX_VALUE 1600000000 -@@ -1081,7 +1081,7 @@ +@@ -1069,7 +1069,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 100 VARIABLE_SCOPE GLOBAL @@ -373,14 +342,14 @@ READ_ONLY YES @@ -1489,7 +1489,7 @@ SESSION_VALUE NULL - DEFAULT_VALUE 4 + DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_TYPE INT UNSIGNED VARIABLE_COMMENT Deprecated parameter with no effect. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 64 -@@ -1525,7 +1525,7 @@ +@@ -1513,7 +1513,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 16384 VARIABLE_SCOPE GLOBAL @@ -389,7 +358,7 @@ VARIABLE_COMMENT Page size to use for all InnoDB tablespaces. NUMERIC_MIN_VALUE 4096 NUMERIC_MAX_VALUE 65536 -@@ -1561,7 +1561,7 @@ +@@ -1549,7 +1549,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 300 VARIABLE_SCOPE GLOBAL @@ -398,7 +367,7 @@ VARIABLE_COMMENT Number of UNDO log pages to purge in one batch from the history list. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 5000 -@@ -1573,7 +1573,7 @@ +@@ -1561,7 +1561,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 128 VARIABLE_SCOPE GLOBAL @@ -407,7 +376,7 @@ VARIABLE_COMMENT Dictates rate at which UNDO records are purged. Value N means purge rollback segment(s) on every Nth iteration of purge invocation NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 128 -@@ -1609,7 +1609,7 @@ +@@ -1597,7 +1597,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 56 VARIABLE_SCOPE GLOBAL @@ -416,7 +385,7 @@ VARIABLE_COMMENT Number of pages that must be accessed sequentially for InnoDB to trigger a readahead. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 64 -@@ -1621,7 +1621,7 @@ +@@ -1609,7 +1609,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 4 VARIABLE_SCOPE GLOBAL @@ -425,20 +394,7 @@ VARIABLE_COMMENT Number of background read I/O threads in InnoDB. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 64 -@@ -1645,10 +1645,10 @@ - SESSION_VALUE NULL - DEFAULT_VALUE 0 - VARIABLE_SCOPE GLOBAL --VARIABLE_TYPE BIGINT UNSIGNED -+VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT Replication thread delay (ms) on the slave server if innodb_thread_concurrency is reached (0 by default) - NUMERIC_MIN_VALUE 0 --NUMERIC_MAX_VALUE 18446744073709551615 -+NUMERIC_MAX_VALUE 4294967295 - NUMERIC_BLOCK_SIZE 0 - ENUM_VALUE_LIST NULL - READ_ONLY NO -@@ -1669,7 +1669,7 @@ +@@ -1657,7 +1657,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -447,7 +403,7 @@ VARIABLE_COMMENT An InnoDB page number. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -1717,7 +1717,7 @@ +@@ -1705,7 +1705,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 1048576 VARIABLE_SCOPE GLOBAL @@ -456,7 +412,7 @@ VARIABLE_COMMENT Memory buffer size for index creation NUMERIC_MIN_VALUE 65536 NUMERIC_MAX_VALUE 67108864 -@@ -1885,7 +1885,7 @@ +@@ -1873,7 +1873,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL @@ -465,7 +421,7 @@ VARIABLE_COMMENT Size of the mutex/lock wait array. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1024 -@@ -1909,10 +1909,10 @@ +@@ -1897,10 +1897,10 @@ SESSION_VALUE NULL DEFAULT_VALUE 30 VARIABLE_SCOPE GLOBAL @@ -478,25 +434,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1945,7 +1945,7 @@ - SESSION_VALUE NULL - DEFAULT_VALUE 0 - VARIABLE_SCOPE GLOBAL --VARIABLE_TYPE BIGINT UNSIGNED -+VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling. - NUMERIC_MIN_VALUE 0 - NUMERIC_MAX_VALUE 1000 -@@ -1957,7 +1957,7 @@ - SESSION_VALUE NULL - DEFAULT_VALUE 10000 - VARIABLE_SCOPE GLOBAL --VARIABLE_TYPE BIGINT UNSIGNED -+VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep - NUMERIC_MIN_VALUE 0 - NUMERIC_MAX_VALUE 1000000 -@@ -2017,7 +2017,7 @@ +@@ -2005,7 +2005,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 128 VARIABLE_SCOPE GLOBAL @@ -505,7 +443,7 @@ VARIABLE_COMMENT Deprecated parameter with no effect. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 128 -@@ -2041,7 +2041,7 @@ +@@ -2029,7 +2029,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -514,7 +452,7 @@ VARIABLE_COMMENT Number of undo tablespaces to use. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 127 -@@ -2065,7 +2065,7 @@ +@@ -2053,7 +2053,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 4 VARIABLE_SCOPE GLOBAL diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index 4d062995b1e..7e59a8ea810 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -59,10 +59,10 @@ READ_ONLY YES COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY SESSION_VALUE NULL -DEFAULT_VALUE 150000 +DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it. +VARIABLE_TYPE INT UNSIGNED +VARIABLE_COMMENT Deprecated parameter with no effect. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1000000 NUMERIC_BLOCK_SIZE 0 @@ -385,8 +385,8 @@ VARIABLE_NAME INNODB_COMMIT_CONCURRENCY SESSION_VALUE NULL DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. +VARIABLE_TYPE INT UNSIGNED +VARIABLE_COMMENT Deprecated parameter with no effect. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1000 NUMERIC_BLOCK_SIZE 0 @@ -455,12 +455,12 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME INNODB_CONCURRENCY_TICKETS SESSION_VALUE NULL -DEFAULT_VALUE 5000 +DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket -NUMERIC_MIN_VALUE 1 -NUMERIC_MAX_VALUE 18446744073709551615 +VARIABLE_TYPE INT UNSIGNED +VARIABLE_COMMENT Deprecated parameter with no effect. +NUMERIC_MIN_VALUE 0 +NUMERIC_MAX_VALUE 4294967295 NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO @@ -1633,10 +1633,10 @@ VARIABLE_NAME INNODB_REPLICATION_DELAY SESSION_VALUE NULL DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT Replication thread delay (ms) on the slave server if innodb_thread_concurrency is reached (0 by default) +VARIABLE_TYPE INT UNSIGNED +VARIABLE_COMMENT Deprecated parameter with no effect. NUMERIC_MIN_VALUE 0 -NUMERIC_MAX_VALUE 18446744073709551615 +NUMERIC_MAX_VALUE 4294967295 NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO @@ -1933,8 +1933,8 @@ VARIABLE_NAME INNODB_THREAD_CONCURRENCY SESSION_VALUE NULL DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling. +VARIABLE_TYPE INT UNSIGNED +VARIABLE_COMMENT Deprecated parameter with no effect. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1000 NUMERIC_BLOCK_SIZE 0 @@ -1943,10 +1943,10 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME INNODB_THREAD_SLEEP_DELAY SESSION_VALUE NULL -DEFAULT_VALUE 10000 +DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep +VARIABLE_TYPE INT UNSIGNED +VARIABLE_COMMENT Deprecated parameter with no effect. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1000000 NUMERIC_BLOCK_SIZE 0 diff --git a/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test b/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test index 4ed706b372b..67be561348a 100644 --- a/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test @@ -52,8 +52,9 @@ SELECT @@global.innodb_commit_concurrency; # Check if innodb_commit_concurrency can be accessed with and without @@ sign# ################################################################################ ---Error ER_GLOBAL_VARIABLE +--error ER_GLOBAL_VARIABLE SET innodb_commit_concurrency = 1; +SET GLOBAL innodb_commit_concurrency = 1; SELECT @@innodb_commit_concurrency; @@ -79,14 +80,8 @@ SELECT @@global.innodb_commit_concurrency; # Change the value of innodb_commit_concurrency to invalid value # ########################################################################### -# -# InnoDB doesn't allow innodb_commit_concurrency to change from -# zero to non-zero or vice versa -# ---Error ER_WRONG_VALUE_FOR_VAR -SET @@global.innodb_commit_concurrency = 1; SELECT @@global.innodb_commit_concurrency; ---Error ER_WRONG_VALUE_FOR_VAR +SELECT @@global.innodb_commit_concurrency; SET @@global.innodb_commit_concurrency = -1; SELECT @@global.innodb_commit_concurrency; --Error ER_WRONG_TYPE_FOR_VAR @@ -98,7 +93,6 @@ SELECT @@global.innodb_commit_concurrency; --Error ER_WRONG_TYPE_FOR_VAR SET @@global.innodb_commit_concurrency = 1.1; SELECT @@global.innodb_commit_concurrency; ---Error ER_WRONG_VALUE_FOR_VAR SET @@global.innodb_commit_concurrency = 1001; SELECT @@global.innodb_commit_concurrency; diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index b6ea78115e9..0547674a4dd 100644 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -235,7 +235,6 @@ SET(INNOBASE_SOURCES include/row0upd.h include/row0upd.ic include/row0vers.h - include/srv0conc.h include/srv0mon.h include/srv0mon.ic include/srv0srv.h @@ -328,7 +327,6 @@ SET(INNOBASE_SOURCES row/row0upd.cc row/row0quiesce.cc row/row0vers.cc - srv/srv0conc.cc srv/srv0mon.cc srv/srv0srv.cc srv/srv0start.cc diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 1db3d73c027..cf51b91af64 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -157,9 +157,6 @@ void close_thread_tables(THD* thd); #endif /* WITH_WSREP */ /** to force correct commit order in binlog */ -static ulong commit_threads = 0; -static mysql_cond_t commit_cond; -static mysql_mutex_t commit_cond_m; static mysql_mutex_t pending_checkpoint_mutex; #define INSIDE_HA_INNOBASE_CC @@ -174,7 +171,6 @@ static const long AUTOINC_NO_LOCKING = 2; static ulong innobase_open_files; static long innobase_autoinc_lock_mode; -static ulong innobase_commit_concurrency; static ulonglong innobase_buffer_pool_size; @@ -1184,20 +1180,6 @@ innobase_release_savepoint( static void innobase_checkpoint_request(handlerton *hton, void *cookie); -/** @brief Initialize the default value of innodb_commit_concurrency. - -Once InnoDB is running, the innodb_commit_concurrency must not change -from zero to nonzero. (Bug #42101) - -The initial default value is 0, and without this extra initialization, -SET GLOBAL innodb_commit_concurrency=DEFAULT would set the parameter -to 0, even if it was initially set to nonzero at the command line -or configuration file. */ -static -void -innobase_commit_concurrency_init_default(); -/*=======================================*/ - /** @brief Adjust some InnoDB startup parameters based on file contents or innodb_page_size. */ static @@ -1377,36 +1359,6 @@ innobase_fts_store_docid( } #endif -/*************************************************************//** -Check for a valid value of innobase_commit_concurrency. -@return 0 for valid innodb_commit_concurrency */ -static -int -innobase_commit_concurrency_validate( -/*=================================*/ - THD*, st_mysql_sys_var*, - void* save, /*!< out: immediate result - for update function */ - struct st_mysql_value* value) /*!< in: incoming string */ -{ - long long intbuf; - ulong commit_concurrency; - - DBUG_ENTER("innobase_commit_concurrency_validate"); - - if (value->val_int(value, &intbuf)) { - /* The value is NULL. That is invalid. */ - DBUG_RETURN(1); - } - - *reinterpret_cast<ulong*>(save) = commit_concurrency - = static_cast<ulong>(intbuf); - - /* Allow the value to be updated, as long as it remains zero - or nonzero. */ - DBUG_RETURN(!(!commit_concurrency == !innobase_commit_concurrency)); -} - /*******************************************************************//** Function for constructing an InnoDB table handler instance. */ static @@ -1449,10 +1401,7 @@ innodb_page_size_validate( /******************************************************************//** Returns true if the thread is the replication thread on the slave -server. Used in srv_conc_enter_innodb() to determine if the thread -should be allowed to enter InnoDB - the replication thread is treated -differently than other threads. Also used in -srv_conc_force_exit_innodb(). +server. @return true if thd is the replication thread */ ibool thd_is_replication_slave_thread( @@ -1541,77 +1490,6 @@ thd_trx_is_auto_commit( && thd_is_select(thd)); } -/** Enter InnoDB engine after checking the max number of user threads -allowed, else the thread is put into sleep. -@param[in,out] prebuilt row prebuilt handler */ -static inline void innobase_srv_conc_enter_innodb(row_prebuilt_t *prebuilt) -{ - trx_t* trx = prebuilt->trx; - -#ifdef WITH_WSREP - if (trx->is_wsrep() && wsrep_thd_is_BF(trx->mysql_thd, FALSE)) return; -#endif /* WITH_WSREP */ - - if (srv_thread_concurrency) { - if (trx->n_tickets_to_enter_innodb > 0) { - - /* If trx has 'free tickets' to enter the engine left, - then use one such ticket */ - - --trx->n_tickets_to_enter_innodb; - - } else if (trx->mysql_thd != NULL - && thd_is_replication_slave_thread(trx->mysql_thd)) { - const ulonglong end = my_interval_timer() - + ulonglong(srv_replication_delay) * 1000000; - while ((srv_conc_get_active_threads() - >= srv_thread_concurrency) - && my_interval_timer() < end) { - os_thread_sleep(2000 /* 2 ms */); - } - } else { - srv_conc_enter_innodb(prebuilt); - } - } -} - -/** Note that the thread wants to leave InnoDB only if it doesn't have -any spare tickets. -@param[in,out] m_prebuilt row prebuilt handler */ -static inline void innobase_srv_conc_exit_innodb(row_prebuilt_t *prebuilt) -{ - ut_ad(!sync_check_iterate(sync_check())); - - trx_t* trx = prebuilt->trx; - -#ifdef WITH_WSREP - if (trx->is_wsrep() && wsrep_thd_is_BF(trx->mysql_thd, FALSE)) return; -#endif /* WITH_WSREP */ - - /* This is to avoid making an unnecessary function call. */ - if (trx->declared_to_be_inside_innodb - && trx->n_tickets_to_enter_innodb == 0) { - - srv_conc_force_exit_innodb(trx); - } -} - -/******************************************************************//** -Force a thread to leave InnoDB even if it has spare tickets. */ -static inline -void -innobase_srv_conc_force_exit_innodb( -/*================================*/ - trx_t* trx) /*!< in: transaction handle */ -{ - ut_ad(!sync_check_iterate(sync_check())); - - /* This is to avoid making an unnecessary function call. */ - if (trx->declared_to_be_inside_innodb) { - srv_conc_force_exit_innodb(trx); - } -} - /******************************************************************//** Returns the NUL terminated value of glob_hostname. @return pointer to glob_hostname. */ @@ -2905,8 +2783,6 @@ innobase_query_caching_of_table_permitted( return(false); } - innobase_srv_conc_force_exit_innodb(trx); - if (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN) && trx->n_mysql_tables_in_use == 0) { /* We are going to retrieve the query result from the query @@ -3204,8 +3080,6 @@ ha_innobase::init_table_handle_for_HANDLER(void) /* Initialize the m_prebuilt struct much like it would be inited in external_lock */ - innobase_srv_conc_force_exit_innodb(m_prebuilt->trx); - /* If the transaction is not started yet, start it */ trx_start_if_not_started_xa(m_prebuilt->trx, false); @@ -3388,6 +3262,65 @@ static uint innodb_background_scrub_data_interval; static const char* innodb_background_scrub_data_interval_msg = "The parameter innodb_background_scrub_data_interval is deprecated and" " has no effect."; + +uint replication_delay; +uint thread_concurrency; +uint commit_concurrency; +uint concurrency_tickets; +uint adaptive_max_sleep_delay; +uint thread_sleep_delay; + +static const char * const replication_delay_msg += "The parameter innodb_replication_delay is deprecated and has no effect."; +static const char * const thread_concurrency_msg += "The parameter innodb_thread_concurrency is deprecated and has no effect."; +static const char * const commit_concurrency_msg += "The parameter innodb_commit_concurrency is deprecated and has no effect."; +static const char * const concurrency_tickets_msg += "The parameter innodb_concurrency_tickets is deprecated and has no effect."; +static const char * const adaptive_max_sleep_delay_msg += "The parameter innodb_adaptive_max_sleep_delay is deprecated and" + " has no effect."; +static const char * const thread_sleep_delay_msg += "The parameter innodb_thread_sleep_delay is deprecated and has no effect."; + +static void replication_delay_warn(THD* thd, st_mysql_sys_var*, void*, + const void*) +{ + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, HA_ERR_UNSUPPORTED, + replication_delay_msg); +} +static void thread_concurrency_warn(THD* thd, st_mysql_sys_var*, void*, + const void*) +{ + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, HA_ERR_UNSUPPORTED, + thread_concurrency_msg); +} +static void commit_concurrency_warn(THD* thd, st_mysql_sys_var*, void*, + const void*) +{ + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, HA_ERR_UNSUPPORTED, + commit_concurrency_msg); +} +static void concurrency_tickets_warn(THD* thd, st_mysql_sys_var*, void*, + const void*) +{ + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, HA_ERR_UNSUPPORTED, + concurrency_tickets_msg); +} +static void adaptive_max_sleep_delay_warn(THD* thd, st_mysql_sys_var*, void*, + const void*) +{ + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, HA_ERR_UNSUPPORTED, + adaptive_max_sleep_delay_msg); +} +static void thread_sleep_delay_warn(THD* thd, st_mysql_sys_var*, void*, + const void*) +{ + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, HA_ERR_UNSUPPORTED, + thread_sleep_delay_msg); +} + } // namespace deprecated /** Initialize, validate and normalize the InnoDB startup parameters. @@ -3462,6 +3395,31 @@ static int innodb_init_params() deprecated::innodb_undo_logs = TRX_SYS_N_RSEGS; } + if (UNIV_UNLIKELY(deprecated::replication_delay)) { + sql_print_warning(deprecated::replication_delay_msg); + deprecated::replication_delay = 0; + } + if (UNIV_UNLIKELY(deprecated::thread_concurrency)) { + sql_print_warning(deprecated::thread_concurrency_msg); + deprecated::thread_concurrency = 0; + } + if (UNIV_UNLIKELY(deprecated::commit_concurrency)) { + sql_print_warning(deprecated::commit_concurrency_msg); + deprecated::commit_concurrency = 0; + } + if (UNIV_UNLIKELY(deprecated::concurrency_tickets)) { + sql_print_warning(deprecated::concurrency_tickets_msg); + deprecated::concurrency_tickets = 0; + } + if (UNIV_UNLIKELY(deprecated::adaptive_max_sleep_delay)) { + sql_print_warning(deprecated::adaptive_max_sleep_delay_msg); + deprecated::adaptive_max_sleep_delay = 0; + } + if (UNIV_UNLIKELY(deprecated::thread_sleep_delay)) { + sql_print_warning(deprecated::thread_sleep_delay_msg); + deprecated::thread_sleep_delay = 0; + } + /* Check that values don't overflow on 32-bit systems. */ if (sizeof(ulint) == 4) { if (innobase_buffer_pool_size > UINT_MAX32) { @@ -3774,8 +3732,6 @@ static int innodb_init_params() data_mysql_default_charset_coll = (ulint) default_charset_info->number; - innobase_commit_concurrency_init_default(); - srv_use_atomic_writes = innobase_use_atomic_writes && my_may_have_atomic_write; if (srv_use_atomic_writes && !srv_file_per_table) @@ -3986,9 +3942,6 @@ static int innodb_init(void* p) ibuf_max_size_update(srv_change_buffer_max_size); - mysql_mutex_init(commit_cond_mutex_key, - &commit_cond_m, MY_MUTEX_INIT_FAST); - mysql_cond_init(commit_cond_key, &commit_cond, 0); mysql_mutex_init(pending_checkpoint_mutex_key, &pending_checkpoint_mutex, MY_MUTEX_INIT_FAST); @@ -4058,8 +4011,6 @@ innobase_end(handlerton*, ha_panic_function) innodb_shutdown(); innobase_space_shutdown(); - mysql_mutex_destroy(&commit_cond_m); - mysql_cond_destroy(&commit_cond); mysql_mutex_destroy(&pending_checkpoint_mutex); } @@ -4127,8 +4078,6 @@ innobase_start_trx_and_assign_read_view( trx_t* trx = check_trx_exists(thd); - innobase_srv_conc_force_exit_innodb(trx); - /* The transaction should not be active yet, start it */ ut_ad(!trx_is_started(trx)); @@ -4168,30 +4117,9 @@ innobase_commit_ordered_2( { DBUG_ENTER("innobase_commit_ordered_2"); - bool read_only = trx->read_only || trx->id == 0; + const bool read_only = trx->read_only || trx->id == 0; if (!read_only) { - - while (innobase_commit_concurrency > 0) { - - mysql_mutex_lock(&commit_cond_m); - - ++commit_threads; - - if (commit_threads - <= innobase_commit_concurrency) { - - mysql_mutex_unlock(&commit_cond_m); - break; - } - - --commit_threads; - - mysql_cond_wait(&commit_cond, &commit_cond_m); - - mysql_mutex_unlock(&commit_cond_m); - } - /* The following call reads the binary log position of the transaction being committed. @@ -4225,18 +4153,6 @@ innobase_commit_ordered_2( if (!read_only) { trx->mysql_log_file_name = NULL; trx->flush_log_later = false; - - if (innobase_commit_concurrency > 0) { - - mysql_mutex_lock(&commit_cond_m); - - ut_ad(commit_threads > 0); - --commit_threads; - - mysql_cond_signal(&commit_cond); - - mysql_mutex_unlock(&commit_cond_m); - } } DBUG_VOID_RETURN; @@ -4377,8 +4293,6 @@ innobase_commit( /* This is a statement level variable. */ trx->fts_next_doc_id = 0; - innobase_srv_conc_force_exit_innodb(trx); - DBUG_RETURN(0); } @@ -4406,8 +4320,6 @@ innobase_rollback( ut_ad(trx->dict_operation_lock_mode == 0); ut_ad(trx->dict_operation == TRX_DICT_OP_NONE); - innobase_srv_conc_force_exit_innodb(trx); - /* Reset the number AUTO-INC rows required */ trx->n_autoinc_rows = 0; @@ -4458,8 +4370,6 @@ innobase_rollback_trx( DBUG_ENTER("innobase_rollback_trx"); DBUG_PRINT("trans", ("aborting transaction")); - innobase_srv_conc_force_exit_innodb(trx); - /* If we had reserved the auto-inc lock for some table (if we come here to roll back the latest SQL statement) we release it now before a possibly lengthy rollback */ @@ -4630,8 +4540,6 @@ innobase_rollback_to_savepoint( trx_t* trx = check_trx_exists(thd); - innobase_srv_conc_force_exit_innodb(trx); - /* TODO: use provided savepoint data area to store savepoint data */ char name[64]; @@ -4736,8 +4644,6 @@ innobase_savepoint( trx_t* trx = check_trx_exists(thd); - innobase_srv_conc_force_exit_innodb(trx); - /* Cannot happen outside of transaction */ DBUG_ASSERT(trx_is_registered_for_2pc(trx)); @@ -7683,8 +7589,6 @@ ha_innobase::write_row( build_template(true); } - innobase_srv_conc_enter_innodb(m_prebuilt); - vers_set_fields = table->versioned_write(VERS_TRX_ID) ? ROW_INS_VERSIONED : ROW_INS_NORMAL; @@ -7754,8 +7658,6 @@ ha_innobase::write_row( wsrep_thd_query(m_user_thd)); error= DB_SUCCESS; wsrep_thd_self_abort(m_user_thd); - innobase_srv_conc_exit_innodb( - m_prebuilt); /* jump straight to func exit over * later wsrep hooks */ goto func_exit; @@ -7823,8 +7725,6 @@ set_max_autoinc: } } - innobase_srv_conc_exit_innodb(m_prebuilt); - report_error: /* Cleanup and exit. */ if (error == DB_TABLESPACE_DELETED) { @@ -8476,8 +8376,6 @@ ha_innobase::update_row( ? VERSIONED_DELETE : NO_DELETE; - innobase_srv_conc_enter_innodb(m_prebuilt); - error = row_update_for_mysql(m_prebuilt); if (error == DB_SUCCESS && vers_ins_row @@ -8530,8 +8428,6 @@ ha_innobase::update_row( } } - innobase_srv_conc_exit_innodb(m_prebuilt); - func_exit: if (error == DB_FTS_INVALID_DOCID) { err = HA_FTS_INVALID_DOCID; @@ -8596,12 +8492,8 @@ ha_innobase::delete_row( ? VERSIONED_DELETE : PLAIN_DELETE; - innobase_srv_conc_enter_innodb(m_prebuilt); - error = row_update_for_mysql(m_prebuilt); - innobase_srv_conc_exit_innodb(m_prebuilt); - #ifdef WITH_WSREP if (error == DB_SUCCESS && trx->is_wsrep() && wsrep_thd_is_local(m_user_thd) @@ -8902,20 +8794,8 @@ ha_innobase::index_read( m_last_match_mode = (uint) match_mode; - dberr_t ret; - - if (mode != PAGE_CUR_UNSUPP) { - - innobase_srv_conc_enter_innodb(m_prebuilt); - - ret = row_search_mvcc( - buf, mode, m_prebuilt, match_mode, 0); - - innobase_srv_conc_exit_innodb(m_prebuilt); - } else { - - ret = DB_UNSUPPORTED; - } + dberr_t ret = mode == PAGE_CUR_UNSUPP ? DB_UNSUPPORTED + : row_search_mvcc(buf, mode, m_prebuilt, match_mode, 0); DBUG_EXECUTE_IF("ib_select_query_failure", ret = DB_ERROR;); @@ -9171,16 +9051,10 @@ ha_innobase::general_fetch( : HA_ERR_NO_SUCH_TABLE); } - innobase_srv_conc_enter_innodb(m_prebuilt); - - dberr_t ret = row_search_mvcc( - buf, PAGE_CUR_UNSUPP, m_prebuilt, match_mode, direction); - - innobase_srv_conc_exit_innodb(m_prebuilt); - int error; - switch (ret) { + switch (dberr_t ret = row_search_mvcc(buf, PAGE_CUR_UNSUPP, m_prebuilt, + match_mode, direction)) { case DB_SUCCESS: error = 0; table->status = 0; @@ -9691,16 +9565,11 @@ next_record: tuple. */ innobase_fts_create_doc_id_key(tuple, index, &search_doc_id); - innobase_srv_conc_enter_innodb(m_prebuilt); - - dberr_t ret = row_search_for_mysql( - (byte*) buf, PAGE_CUR_GE, m_prebuilt, ROW_SEL_EXACT, 0); - - innobase_srv_conc_exit_innodb(m_prebuilt); - int error; - switch (ret) { + switch (dberr_t ret = row_search_for_mysql(buf, PAGE_CUR_GE, + m_prebuilt, + ROW_SEL_EXACT, 0)) { case DB_SUCCESS: error = 0; table->status = 0; @@ -15640,8 +15509,6 @@ ha_innobase::start_stmt( trx = m_prebuilt->trx; - innobase_srv_conc_force_exit_innodb(trx); - /* Reset the AUTOINC statement level counter for multi-row INSERTs. */ trx->n_autoinc_rows = 0; @@ -15947,8 +15814,6 @@ ha_innobase::external_lock( trx->n_mysql_tables_in_use--; m_mysql_has_locked = false; - innobase_srv_conc_force_exit_innodb(trx); - /* If the MySQL lock count drops to zero we know that the current SQL statement has ended */ @@ -16023,10 +15888,6 @@ innodb_show_status( srv_wake_purge_thread_if_not_active(); - trx_t* trx = check_trx_exists(thd); - - innobase_srv_conc_force_exit_innodb(trx); - /* We let the InnoDB Monitor to output at most MAX_STATUS_SIZE bytes of text. */ @@ -17139,8 +17000,6 @@ innobase_xa_prepare( thd_get_xid(thd, (MYSQL_XID*) trx->xid); - innobase_srv_conc_force_exit_innodb(trx); - if (!trx_is_registered_for_2pc(trx) && trx_is_started(trx)) { sql_print_error("Transaction not registered for MariaDB 2PC," @@ -19029,7 +18888,6 @@ wsrep_abort_transaction( victim_trx, signal); trx_mutex_exit(victim_trx); lock_mutex_exit(); - wsrep_srv_conc_cancel_wait(victim_trx); DBUG_RETURN(rcode); } else { wsrep_thd_bf_abort(bf_thd, victim_thd, signal); @@ -19386,11 +19244,10 @@ static MYSQL_SYSVAR_ULONG(adaptive_hash_index_parts, btr_ahi_parts, NULL, NULL, 8, 1, 512, 0); #endif /* BTR_CUR_HASH_ADAPT */ -static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay, +static MYSQL_SYSVAR_UINT(replication_delay, deprecated::replication_delay, PLUGIN_VAR_RQCMDARG, - "Replication thread delay (ms) on the slave server if" - " innodb_thread_concurrency is reached (0 by default)", - NULL, NULL, 0, 0, ~0UL, 0); + innodb_deprecated_ignored, nullptr, deprecated::replication_delay_warn, + 0, 0, ~0U, 0); static MYSQL_SYSVAR_UINT(compression_level, page_zip_level, PLUGIN_VAR_RQCMDARG, @@ -19586,15 +19443,15 @@ static MYSQL_SYSVAR_ULONG(flush_neighbors, srv_flush_neighbors, " when flushing a block", NULL, NULL, 1, 0, 2, 0); -static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency, +static MYSQL_SYSVAR_UINT(commit_concurrency, deprecated::commit_concurrency, PLUGIN_VAR_RQCMDARG, - "Helps in performance tuning in heavily concurrent environments.", - innobase_commit_concurrency_validate, NULL, 0, 0, 1000, 0); + innodb_deprecated_ignored, nullptr, deprecated::commit_concurrency_warn, + 0, 0, 1000, 0); -static MYSQL_SYSVAR_ULONG(concurrency_tickets, srv_n_free_tickets_to_enter, +static MYSQL_SYSVAR_UINT(concurrency_tickets, deprecated::concurrency_tickets, PLUGIN_VAR_RQCMDARG, - "Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket", - NULL, NULL, 5000L, 1L, ~0UL, 0); + innodb_deprecated_ignored, nullptr, deprecated::concurrency_tickets_warn, + 0, 0, ~0U, 0); static MYSQL_SYSVAR_BOOL(deadlock_detect, innobase_deadlock_detect, PLUGIN_VAR_NOCMDARG, @@ -19743,19 +19600,16 @@ static MYSQL_SYSVAR_UINT(spin_wait_delay, srv_spin_wait_delay, "Maximum delay between polling for a spin lock (4 by default)", NULL, NULL, 4, 0, 6000, 0); -static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency, +static MYSQL_SYSVAR_UINT(thread_concurrency, deprecated::thread_concurrency, PLUGIN_VAR_RQCMDARG, - "Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.", - NULL, NULL, 0, 0, 1000, 0); + innodb_deprecated_ignored, nullptr, deprecated::thread_concurrency_warn, + 0, 0, 1000, 0); -static MYSQL_SYSVAR_ULONG( - adaptive_max_sleep_delay, srv_adaptive_max_sleep_delay, +static MYSQL_SYSVAR_UINT( + adaptive_max_sleep_delay, deprecated::adaptive_max_sleep_delay, PLUGIN_VAR_RQCMDARG, - "The upper limit of the sleep delay in usec. Value of 0 disables it.", - NULL, NULL, - 150000, /* Default setting */ - 0, /* Minimum value */ - 1000000, 0); /* Maximum value */ + innodb_deprecated_ignored, + nullptr, deprecated::adaptive_max_sleep_delay_warn, 0, 0, 1000000, 0); static MYSQL_SYSVAR_BOOL(prefix_index_cluster_optimization, srv_prefix_index_cluster_optimization, @@ -19763,14 +19617,10 @@ static MYSQL_SYSVAR_BOOL(prefix_index_cluster_optimization, "Enable prefix optimization to sometimes avoid cluster index lookups.", NULL, NULL, FALSE); -static MYSQL_SYSVAR_ULONG(thread_sleep_delay, srv_thread_sleep_delay, +static MYSQL_SYSVAR_UINT(thread_sleep_delay, deprecated::thread_sleep_delay, PLUGIN_VAR_RQCMDARG, - "Time of innodb thread sleeping before joining InnoDB queue (usec)." - " Value 0 disable a sleep", - NULL, NULL, - 10000L, - 0L, - 1000000L, 0); + innodb_deprecated_ignored, nullptr, deprecated::thread_sleep_delay_warn, + 0, 0, 1000000, 0); static MYSQL_SYSVAR_STR(data_file_path, innobase_data_file_path, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, @@ -20443,24 +20293,6 @@ i_s_innodb_sys_semaphore_waits, i_s_innodb_tablespaces_encryption maria_declare_plugin_end; -/** @brief Initialize the default value of innodb_commit_concurrency. - -Once InnoDB is running, the innodb_commit_concurrency must not change -from zero to nonzero. (Bug #42101) - -The initial default value is 0, and without this extra initialization, -SET GLOBAL innodb_commit_concurrency=DEFAULT would set the parameter -to 0, even if it was initially set to nonzero at the command line -or configuration file. */ -static -void -innobase_commit_concurrency_init_default() -/*======================================*/ -{ - MYSQL_SYSVAR_NAME(commit_concurrency).def_val - = innobase_commit_concurrency; -} - /** @brief Adjust some InnoDB startup parameters based on file contents or innodb_page_size. */ static diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc index 255bc889205..897bda85d9b 100644 --- a/storage/innobase/handler/i_s.cc +++ b/storage/innobase/handler/i_s.cc @@ -470,8 +470,7 @@ fill_innodb_trx_from_cache( row->trx_rows_modified, true)); /* trx_concurrency_tickets */ - OK(fields[IDX_TRX_CONNCURRENCY_TICKETS]->store( - row->trx_concurrency_tickets, true)); + OK(fields[IDX_TRX_CONNCURRENCY_TICKETS]->store(0, true)); /* trx_isolation_level */ OK(fields[IDX_TRX_ISOLATION_LEVEL]->store( diff --git a/storage/innobase/include/ha_prototypes.h b/storage/innobase/include/ha_prototypes.h index ef1174c95dd..0632c0c5140 100644 --- a/storage/innobase/include/ha_prototypes.h +++ b/storage/innobase/include/ha_prototypes.h @@ -110,10 +110,7 @@ innobase_convert_name( /******************************************************************//** Returns true if the thread is the replication thread on the slave -server. Used in srv_conc_enter_innodb() to determine if the thread -should be allowed to enter InnoDB - the replication thread is treated -differently than other threads. Also used in -srv_conc_force_exit_innodb(). +server. @return true if thd is the replication thread */ ibool thd_is_replication_slave_thread( diff --git a/storage/innobase/include/que0types.h b/storage/innobase/include/que0types.h index d9005095d3c..38f6e380a30 100644 --- a/storage/innobase/include/que0types.h +++ b/storage/innobase/include/que0types.h @@ -35,6 +35,7 @@ typedef void que_node_t; /* Query graph root is a fork node */ typedef struct que_fork_t que_t; +struct row_prebuilt_t; struct que_thr_t; /* Query graph node types */ diff --git a/storage/innobase/include/srv0conc.h b/storage/innobase/include/srv0conc.h deleted file mode 100644 index d24107735ed..00000000000 --- a/storage/innobase/include/srv0conc.h +++ /dev/null @@ -1,93 +0,0 @@ -/***************************************************************************** - -Copyright (c) 2011, 2014, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2018, MariaDB Corporation. - -Portions of this file contain modifications contributed and copyrighted by -Google, Inc. Those modifications are gratefully acknowledged and are described -briefly in the InnoDB documentation. The contributions by Google are -incorporated with their permission, and subject to the conditions contained in -the file COPYING.Google. - -Portions of this file contain modifications contributed and copyrighted -by Percona Inc.. Those modifications are -gratefully acknowledged and are described briefly in the InnoDB -documentation. The contributions by Percona Inc. are incorporated with -their permission, and subject to the conditions contained in the file -COPYING.Percona. - -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 -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -*****************************************************************************/ - -/**************************************************//** -@file srv/srv0conc.h - -InnoDB concurrency manager header file - -Created 2011/04/18 Sunny Bains -*******************************************************/ - -#ifndef srv_conc_h -#define srv_conc_h - -/** We are prepared for a situation that we have this many threads waiting for -a semaphore inside InnoDB. srv_start() sets the value. */ -extern ulint srv_max_n_threads; - -/** The following controls how many threads we let inside InnoDB concurrently: -threads waiting for locks are not counted into the number because otherwise -we could get a deadlock. Value of 0 will disable the concurrency check. */ - -extern ulong srv_thread_concurrency; - -struct row_prebuilt_t; -/*********************************************************************//** -Puts an OS thread to wait if there are too many concurrent threads -(>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. -@param[in,out] prebuilt row prebuilt handler */ -void -srv_conc_enter_innodb( - row_prebuilt_t* prebuilt); - -/*********************************************************************//** -This lets a thread enter InnoDB regardless of the number of threads inside -InnoDB. This must be called when a thread ends a lock wait. */ -void -srv_conc_force_enter_innodb( -/*========================*/ - trx_t* trx); /*!< in: transaction object associated with - the thread */ - -/*********************************************************************//** -This must be called when a thread exits InnoDB in a lock wait or at the -end of an SQL statement. */ -void -srv_conc_force_exit_innodb( -/*=======================*/ - trx_t* trx); /*!< in: transaction object associated with - the thread */ - -/*********************************************************************//** -Get the count of threads waiting inside InnoDB. */ -ulint -srv_conc_get_waiting_threads(void); -/*==============================*/ - -/*********************************************************************//** -Get the count of threads active inside InnoDB. */ -ulint -srv_conc_get_active_threads(void); -/*==============================*/ - -#endif /* srv_conc_h */ diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 9cad1497b85..57542b32719 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -39,14 +39,12 @@ The server main program Created 10/10/1995 Heikki Tuuri *******************************************************/ -#ifndef srv0srv_h -#define srv0srv_h +#pragma once #include "log0log.h" #include "os0event.h" #include "que0types.h" #include "trx0types.h" -#include "srv0conc.h" #include "fil0fil.h" #include "mysql/psi/mysql_stage.h" @@ -198,6 +196,10 @@ struct srv_stats_t ulint_ctr_1_t lock_deadlock_count; }; +/** We are prepared for a situation that we have this many threads waiting for +a semaphore inside InnoDB. srv_start() sets the value. */ +extern ulint srv_max_n_threads; + extern const char* srv_main_thread_op_info; /** Prefix used by MySQL to indicate pre-5.1 table name encoding */ @@ -246,10 +248,6 @@ extern my_bool high_level_read_only; /** store to its own file each table created by an user; data dictionary tables are in the system tablespace 0 */ extern my_bool srv_file_per_table; -/** Sleep delay for threads waiting to enter InnoDB. In micro-seconds. */ -extern ulong srv_thread_sleep_delay; -/** Maximum sleep delay (in micro-seconds), value of 0 disables it.*/ -extern ulong srv_adaptive_max_sleep_delay; /** Sort buffer size in index creation */ extern ulong srv_sort_buf_size; @@ -423,8 +421,6 @@ extern double srv_max_buf_pool_modified_pct; extern ulong srv_max_purge_lag; extern ulong srv_max_purge_lag_delay; -extern ulong srv_replication_delay; - extern my_bool innodb_encrypt_temporary_tables; extern my_bool srv_immediate_scrub_data_uncompressed; @@ -455,8 +451,6 @@ extern bool srv_monitor_active; extern ulong srv_n_spin_wait_rounds; -extern ulong srv_n_free_tickets_to_enter; -extern ulong srv_thread_sleep_delay; extern uint srv_spin_wait_delay; extern ulint srv_truncated_status_writes; @@ -942,14 +936,3 @@ static inline void srv_start_periodic_timer(std::unique_ptr<tpool::timer>& t, void srv_thread_pool_init(); void srv_thread_pool_end(); - -#ifdef WITH_WSREP -UNIV_INTERN -void -wsrep_srv_conc_cancel_wait( -/*==================*/ - trx_t* trx); /*!< in: transaction object associated with the - thread */ -#endif /* WITH_WSREP */ - -#endif diff --git a/storage/innobase/include/srv0start.h b/storage/innobase/include/srv0start.h index 596f6d4f5ab..23dc8347129 100644 --- a/storage/innobase/include/srv0start.h +++ b/storage/innobase/include/srv0start.h @@ -24,8 +24,7 @@ Starts the Innobase database server Created 10/10/1995 Heikki Tuuri *******************************************************/ -#ifndef srv0start_h -#define srv0start_h +#pragma once #include "log0log.h" #include "ut0byte.h" @@ -133,4 +132,3 @@ extern enum srv_shutdown_t srv_shutdown_state; /** Files comprising the system tablespace */ extern pfs_os_file_t files[1000]; -#endif diff --git a/storage/innobase/include/trx0i_s.h b/storage/innobase/include/trx0i_s.h index 4eab97c0b02..892ee3cfe18 100644 --- a/storage/innobase/include/trx0i_s.h +++ b/storage/innobase/include/trx0i_s.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2007, 2015, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2019, MariaDB Corporation. +Copyright (c) 2017, 2020, 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 @@ -141,9 +141,6 @@ struct i_s_trx_row_t { trx->lock_heap) */ ulint trx_rows_locked;/*!< lock_number_of_rows_locked() */ uintmax_t trx_rows_modified;/*!< trx_t::undo_no */ - ulint trx_concurrency_tickets; - /*!< n_tickets_to_enter_innodb in - trx_t */ uint trx_isolation_level; /*!< trx_t::isolation_level */ bool trx_unique_checks; diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 034552fc62e..20043a6c4a4 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -864,17 +864,6 @@ public: ulint duplicates; /*!< TRX_DUP_IGNORE | TRX_DUP_REPLACE */ trx_dict_op_t dict_operation; /**< @see enum trx_dict_op_t */ - /* Fields protected by the srv_conc_mutex. */ - bool declared_to_be_inside_innodb; - /*!< this is TRUE if we have declared - this transaction in - srv_conc_enter_innodb to be inside the - InnoDB engine */ - ib_uint32_t n_tickets_to_enter_innodb; - /*!< this can be > 0 only when - declared_to_... is TRUE; when we come - to srv_conc_innodb_enter, if the value - here is > 0, we decrement this by 1 */ ib_uint32_t dict_operation_lock_mode; /*!< 0, RW_S_LATCH, or RW_X_LATCH: the latch mode trx currently holds @@ -1018,10 +1007,6 @@ public: /*!< Total table lock wait time up to this moment. */ -#ifdef WITH_WSREP - os_event_t wsrep_event; /* event waited for in srv_conc_slot */ -#endif /* WITH_WSREP */ - rw_trx_hash_element_t *rw_trx_hash_element; LF_PINS *rw_trx_hash_pins; ulint magic_n; diff --git a/storage/innobase/lock/lock0wait.cc b/storage/innobase/lock/lock0wait.cc index 7b184495aa3..6b6e2c04659 100644 --- a/storage/innobase/lock/lock0wait.cc +++ b/storage/innobase/lock/lock0wait.cc @@ -234,7 +234,6 @@ lock_wait_suspend_thread( { srv_slot_t* slot; trx_t* trx; - ibool was_declared_inside_innodb; ulong lock_wait_timeout; ut_a(lock_sys.timeout_timer.get()); @@ -329,16 +328,6 @@ lock_wait_suspend_thread( /* Suspend this thread and wait for the event. */ - was_declared_inside_innodb = trx->declared_to_be_inside_innodb; - - if (was_declared_inside_innodb) { - /* We must declare this OS thread to exit InnoDB, since a - possible other thread holding a lock which this thread waits - for must be allowed to enter, sooner or later */ - - srv_conc_force_exit_innodb(trx); - } - /* Unknown is also treated like a record lock */ if (lock_type == ULINT_UNDEFINED || lock_type == LOCK_REC) { thd_wait_begin(trx->mysql_thd, THD_WAIT_ROW_LOCK); @@ -354,13 +343,6 @@ lock_wait_suspend_thread( /* After resuming, reacquire the data dictionary latch if necessary. */ - if (was_declared_inside_innodb) { - - /* Return back inside InnoDB */ - - srv_conc_force_enter_innodb(trx); - } - if (had_dict_lock) { row_mysql_freeze_data_dictionary(trx); diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc index 0fe480ca660..62de68790ed 100644 --- a/storage/innobase/log/log0log.cc +++ b/storage/innobase/log/log0log.cc @@ -448,7 +448,7 @@ log_set_capacity(ulonglong file_size) by single query steps: running out of free log space is a serious system error which requires rebooting the database. */ - free = LOG_CHECKPOINT_FREE_PER_THREAD * (10 + srv_thread_concurrency) + free = LOG_CHECKPOINT_FREE_PER_THREAD * 10 + LOG_CHECKPOINT_EXTRA_FREE; if (free >= smallest_capacity / 2) { ib::error() << "Cannot continue operation because log file is " diff --git a/storage/innobase/srv/srv0conc.cc b/storage/innobase/srv/srv0conc.cc deleted file mode 100644 index 07e0299dc98..00000000000 --- a/storage/innobase/srv/srv0conc.cc +++ /dev/null @@ -1,327 +0,0 @@ -/***************************************************************************** - -Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2015, 2020, MariaDB Corporation. - -Portions of this file contain modifications contributed and copyrighted by -Google, Inc. Those modifications are gratefully acknowledged and are described -briefly in the InnoDB documentation. The contributions by Google are -incorporated with their permission, and subject to the conditions contained in -the file COPYING.Google. - -Portions of this file contain modifications contributed and copyrighted -by Percona Inc.. Those modifications are -gratefully acknowledged and are described briefly in the InnoDB -documentation. The contributions by Percona Inc. are incorporated with -their permission, and subject to the conditions contained in the file -COPYING.Percona. - -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 -Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -*****************************************************************************/ - -/**************************************************//** -@file srv/srv0conc.cc - -InnoDB concurrency manager - -Created 2011/04/18 Sunny Bains -*******************************************************/ - -#include "srv0srv.h" -#include "trx0trx.h" -#include "row0mysql.h" -#include "dict0dict.h" -#include <mysql/service_thd_wait.h> -#include <mysql/service_wsrep.h> - -/** Number of times a thread is allowed to enter InnoDB within the same -SQL query after it has once got the ticket. */ -ulong srv_n_free_tickets_to_enter = 500; - -/** Maximum sleep delay (in micro-seconds), value of 0 disables it. */ -ulong srv_adaptive_max_sleep_delay = 150000; - -ulong srv_thread_sleep_delay = 10000; - - -/** We are prepared for a situation that we have this many threads waiting for -a semaphore inside InnoDB. srv_start() sets the value. */ -ulint srv_max_n_threads; - -/** The following controls how many threads we let inside InnoDB concurrently: -threads waiting for locks are not counted into the number because otherwise -we could get a deadlock. Value of 0 will disable the concurrency check. */ - -ulong srv_thread_concurrency = 0; - -/** Variables tracking the active and waiting threads. */ -struct srv_conc_t { - /** Number of transactions that have declared_to_be_inside_innodb */ - MY_ALIGNED(CPU_LEVEL1_DCACHE_LINESIZE) Atomic_counter<ulint> n_active; - - /** Number of OS threads waiting in the FIFO for permission to - enter InnoDB */ - MY_ALIGNED(CPU_LEVEL1_DCACHE_LINESIZE) Atomic_counter<ulint> n_waiting; -}; - -/* Control variables for tracking concurrency. */ -static srv_conc_t srv_conc; - -/*********************************************************************//** -Note that a user thread is entering InnoDB. */ -static -void -srv_enter_innodb_with_tickets( -/*==========================*/ - trx_t* trx) /*!< in/out: transaction that wants - to enter InnoDB */ -{ - trx->declared_to_be_inside_innodb = TRUE; - trx->n_tickets_to_enter_innodb = static_cast<uint32_t>( - srv_n_free_tickets_to_enter); -} - -/*********************************************************************//** -Handle the scheduling of a user thread that wants to enter InnoDB. Setting -srv_adaptive_max_sleep_delay > 0 switches the adaptive sleep calibration to -ON. When set, we want to wait in the queue for as little time as possible. -However, very short waits will result in a lot of context switches and that -is also not desirable. When threads need to sleep multiple times we increment -os_thread_sleep_delay by one. When we see threads getting a slot without -waiting and there are no other threads waiting in the queue, we try and reduce -the wait as much as we can. Currently we reduce it by half each time. If the -thread only had to wait for one turn before it was able to enter InnoDB we -decrement it by one. This is to try and keep the sleep time stable around the -"optimum" sleep time. */ -static -void -srv_conc_enter_innodb_with_atomics( -/*===============================*/ - trx_t* trx) /*!< in/out: transaction that wants - to enter InnoDB */ -{ - ulint n_sleeps = 0; - ibool notified_mysql = FALSE; - - ut_a(!trx->declared_to_be_inside_innodb); - - for (;;) { - ulint sleep_in_us; -#ifdef WITH_WSREP - if (trx->is_wsrep() && wsrep_thd_is_aborting(trx->mysql_thd)) { - if (UNIV_UNLIKELY(wsrep_debug)) { - ib::info() << - "srv_conc_enter due to MUST_ABORT"; - } - srv_conc_force_enter_innodb(trx); - return; - } -#endif /* WITH_WSREP */ - - if (srv_thread_concurrency == 0) { - if (notified_mysql) { - srv_conc.n_waiting--; - thd_wait_end(trx->mysql_thd); - } - - return; - } - - if (srv_conc.n_active < srv_thread_concurrency) { - - /* Check if there are any free tickets. */ - if (srv_conc.n_active++ < srv_thread_concurrency) { - - srv_enter_innodb_with_tickets(trx); - - if (notified_mysql) { - srv_conc.n_waiting--; - thd_wait_end(trx->mysql_thd); - } - - if (srv_adaptive_max_sleep_delay > 0) { - if (srv_thread_sleep_delay > 20 - && n_sleeps == 1) { - - --srv_thread_sleep_delay; - } - - if (srv_conc.n_waiting == 0) { - srv_thread_sleep_delay >>= 1; - } - } - - return; - } - - /* Since there were no free seats, we relinquish - the overbooked ticket. */ - - srv_conc.n_active--; - } - - if (!notified_mysql) { - srv_conc.n_waiting++; - - thd_wait_begin(trx->mysql_thd, THD_WAIT_USER_LOCK); - - notified_mysql = TRUE; - } - - DEBUG_SYNC_C("user_thread_waiting"); - trx->op_info = "sleeping before entering InnoDB"; - - sleep_in_us = srv_thread_sleep_delay; - - /* Guard against overflow when adaptive sleep delay is on. */ - - if (srv_adaptive_max_sleep_delay > 0 - && sleep_in_us > srv_adaptive_max_sleep_delay) { - - sleep_in_us = srv_adaptive_max_sleep_delay; - srv_thread_sleep_delay = static_cast<ulong>(sleep_in_us); - } - - os_thread_sleep(sleep_in_us); - - trx->op_info = ""; - - ++n_sleeps; - - if (srv_adaptive_max_sleep_delay > 0 && n_sleeps > 1) { - ++srv_thread_sleep_delay; - } - } -} - -/*********************************************************************//** -Note that a user thread is leaving InnoDB code. */ -static -void -srv_conc_exit_innodb_with_atomics( -/*==============================*/ - trx_t* trx) /*!< in/out: transaction */ -{ - trx->n_tickets_to_enter_innodb = 0; - trx->declared_to_be_inside_innodb = FALSE; - - srv_conc.n_active--; -} - -/*********************************************************************//** -Puts an OS thread to wait if there are too many concurrent threads -(>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. -@param[in,out] prebuilt row prebuilt handler */ -void -srv_conc_enter_innodb( - row_prebuilt_t* prebuilt) -{ - trx_t* trx = prebuilt->trx; - - ut_ad(!sync_check_iterate(sync_check())); - - srv_conc_enter_innodb_with_atomics(trx); -} - -/*********************************************************************//** -This lets a thread enter InnoDB regardless of the number of threads inside -InnoDB. This must be called when a thread ends a lock wait. */ -void -srv_conc_force_enter_innodb( -/*========================*/ - trx_t* trx) /*!< in: transaction object associated with the - thread */ -{ - ut_ad(!sync_check_iterate(sync_check())); - - if (!srv_thread_concurrency) { - - return; - } - - srv_conc.n_active++; - - trx->n_tickets_to_enter_innodb = 1; - trx->declared_to_be_inside_innodb = TRUE; -} - -/*********************************************************************//** -This must be called when a thread exits InnoDB in a lock wait or at the -end of an SQL statement. */ -void -srv_conc_force_exit_innodb( -/*=======================*/ - trx_t* trx) /*!< in: transaction object associated with the - thread */ -{ - if ((trx->mysql_thd != NULL - && thd_is_replication_slave_thread(trx->mysql_thd)) - || trx->declared_to_be_inside_innodb == FALSE) { - - return; - } - - srv_conc_exit_innodb_with_atomics(trx); - - ut_ad(!sync_check_iterate(sync_check())); -} - -/*********************************************************************//** -Get the count of threads waiting inside InnoDB. */ -ulint -srv_conc_get_waiting_threads(void) -/*==============================*/ -{ - return(srv_conc.n_waiting); -} - -/*********************************************************************//** -Get the count of threads active inside InnoDB. */ -ulint -srv_conc_get_active_threads(void) -/*==============================*/ -{ - return(srv_conc.n_active); -} - -#ifdef WITH_WSREP -UNIV_INTERN -void -wsrep_srv_conc_cancel_wait( -/*=======================*/ - trx_t* trx) /*!< in: transaction object associated with the - thread */ -{ -#ifdef HAVE_ATOMIC_BUILTINS - /* aborting transactions will enter innodb by force in - srv_conc_enter_innodb_with_atomics(). No need to cancel here, - thr will wake up after os_sleep and let to enter innodb - */ - if (UNIV_UNLIKELY(wsrep_debug)) { - ib::info() << "WSREP: conc slot cancel, no atomics"; - } -#else - // JAN: TODO: MySQL 5.7 - //os_fast_mutex_lock(&srv_conc_mutex); - if (trx->wsrep_event) { - if (UNIV_UNLIKELY(wsrep_debug)) { - ib::info() << "WSREP: conc slot cancel"; - } - os_event_set(trx->wsrep_event); - } - //os_fast_mutex_unlock(&srv_conc_mutex); -#endif -} -#endif /* WITH_WSREP */ - diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 09cdf6fe0c1..aa8a5ea2d14 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -348,9 +348,6 @@ number of pages to use in LRU and flush_list batch flushing. The rest of the doublewrite buffer is used for single-page flushing. */ ulong srv_doublewrite_batch_size = 120; -/** innodb_replication_delay */ -ulong srv_replication_delay; - /** innodb_sync_spin_loops */ ulong srv_n_spin_wait_rounds; /** innodb_spin_wait_delay */ @@ -1006,12 +1003,6 @@ srv_printf_innodb_monitor( fputs("--------------\n" "ROW OPERATIONS\n" "--------------\n", file); - fprintf(file, - ULINTPF " queries inside InnoDB, " - ULINTPF " queries in queue\n", - srv_conc_get_active_threads(), - srv_conc_get_waiting_threads()); - fprintf(file, ULINTPF " read views open inside InnoDB\n", trx_sys.view_count()); diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 60fc333c4ba..85fc90a8e0c 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -101,6 +101,10 @@ Created 2/16/1996 Heikki Tuuri #include "zlib.h" #include "ut0crc32.h" +/** We are prepared for a situation that we have this many threads waiting for +a semaphore inside InnoDB. srv_start() sets the value. */ +ulint srv_max_n_threads; + /** Log sequence number at shutdown */ lsn_t srv_shutdown_lsn; @@ -1196,9 +1200,7 @@ dberr_t srv_start(bool create_new_db) static_cast<int>(UT_ARR_SIZE(srv_stages))); /* Set the maximum number of threads which can wait for a semaphore - inside InnoDB: this is the 'sync wait array' size, as well as the - maximum number of threads that can wait in the 'srv_conc array' for - their time to enter InnoDB. */ + inside InnoDB: this is the 'sync wait array' size */ srv_max_n_threads = 1 /* io_ibuf_thread */ + 1 /* io_log_thread */ @@ -2096,12 +2098,6 @@ void innodb_shutdown() case SRV_OPERATION_NORMAL: /* Shut down the persistent files. */ logs_empty_and_mark_files_at_shutdown(); - - if (ulint n_threads = srv_conc_get_active_threads()) { - ib::warn() << "Query counter shows " - << n_threads << " queries still" - " inside InnoDB at shutdown"; - } } os_aio_free(); diff --git a/storage/innobase/trx/trx0i_s.cc b/storage/innobase/trx/trx0i_s.cc index 8e46057f654..2736dbd285f 100644 --- a/storage/innobase/trx/trx0i_s.cc +++ b/storage/innobase/trx/trx0i_s.cc @@ -499,8 +499,6 @@ thd_done: row->trx_rows_modified = trx->undo_no; - row->trx_concurrency_tickets = trx->n_tickets_to_enter_innodb; - row->trx_isolation_level = trx->isolation_level; row->trx_unique_checks = (ibool) trx->check_unique_secondary; diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index ac9fc7d22c2..a9ba8cd7786 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -377,10 +377,6 @@ trx_t *trx_create() ut_ad(trx->lock.rec_cached == 0); ut_ad(UT_LIST_GET_LEN(trx->lock.evicted_tables) == 0); -#ifdef WITH_WSREP - trx->wsrep_event= NULL; -#endif /* WITH_WSREP */ - trx_sys.register_trx(trx); return(trx); @@ -392,25 +388,11 @@ trx_t *trx_create() */ void trx_free(trx_t*& trx) { - ut_ad(!trx->declared_to_be_inside_innodb); ut_ad(!trx->n_mysql_tables_in_use); ut_ad(!trx->mysql_n_tables_locked); ut_ad(!trx->internal); ut_ad(!trx->mysql_log_file_name); - if (UNIV_UNLIKELY(trx->declared_to_be_inside_innodb)) { - ib::error() << "Freeing a trx (" - << trx_get_id_for_print(trx) << ") which is declared" - " to be processing inside InnoDB"; - - trx_print(stderr, trx, 600); - putc('\n', stderr); - - /* This is an error but not a fatal error. We must keep - the counters like srv_conc.n_active accurate. */ - srv_conc_force_exit_innodb(trx); - } - if (trx->n_mysql_tables_in_use != 0 || trx->mysql_n_tables_locked != 0) { @@ -1824,11 +1806,6 @@ state_ok: fputs(" recovered trx", f); } - if (trx->declared_to_be_inside_innodb) { - fprintf(f, ", thread declared inside InnoDB %lu", - (ulong) trx->n_tickets_to_enter_innodb); - } - putc('\n', f); if (trx->n_mysql_tables_in_use > 0 || trx->mysql_n_tables_locked > 0) { |