diff --git a/mysql-test/suite/innodb/r/information_schema_grants.result b/mysql-test/suite/innodb/r/information_schema_grants.result index 132a77c2649..feadb7b8d12 100644 --- a/mysql-test/suite/innodb/r/information_schema_grants.result +++ b/mysql-test/suite/innodb/r/information_schema_grants.result @@ -50,8 +50,6 @@ create sql security invoker view i_sys_foreign_cols as select * from information create sql security definer view d_sys_foreign_cols as select * from information_schema.innodb_sys_foreign_cols; create sql security invoker view i_sys_indexes as select * from information_schema.innodb_sys_indexes; create sql security definer view d_sys_indexes as select * from information_schema.innodb_sys_indexes; -create sql security invoker view i_sys_semaphore_waits as select * from information_schema.innodb_sys_semaphore_waits; -create sql security definer view d_sys_semaphore_waits as select * from information_schema.innodb_sys_semaphore_waits; create sql security invoker view i_sys_tables as select * from information_schema.innodb_sys_tables; create sql security definer view d_sys_tables as select * from information_schema.innodb_sys_tables; create sql security invoker view i_sys_tablespaces as select * from information_schema.innodb_sys_tablespaces; @@ -222,13 +220,6 @@ ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) select count(*) > -1 from d_sys_indexes; count(*) > -1 1 -select count(*) > -1 from information_schema.innodb_sys_semaphore_waits; -ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation -select count(*) > -1 from i_sys_semaphore_waits; -ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation -select count(*) > -1 from d_sys_semaphore_waits; -count(*) > -1 -1 select count(*) > -1 from information_schema.innodb_sys_tables; ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation select count(*) > -1 from i_sys_tables; diff --git a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result index 83d81bc5ee9..f91d3421796 100644 --- a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result +++ b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result @@ -363,7 +363,3 @@ select * from information_schema.innodb_tablespaces_encryption; SPACE NAME ENCRYPTION_SCHEME KEYSERVER_REQUESTS MIN_KEY_VERSION CURRENT_KEY_VERSION KEY_ROTATION_PAGE_NUMBER KEY_ROTATION_MAX_PAGE_NUMBER CURRENT_KEY_ID ROTATING_OR_FLUSHING Warnings: Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_tablespaces_encryption but the InnoDB storage engine is not installed -select * from information_schema.innodb_sys_semaphore_waits; -THREAD_ID OBJECT_NAME FILE LINE WAIT_TIME WAIT_OBJECT WAIT_TYPE HOLDER_THREAD_ID HOLDER_FILE HOLDER_LINE CREATED_FILE CREATED_LINE WRITER_THREAD RESERVATION_MODE READERS WAITERS_FLAG LOCK_WORD LAST_WRITER_FILE LAST_WRITER_LINE OS_WAIT_COUNT -Warnings: -Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_sys_semaphore_waits but the InnoDB storage engine is not installed diff --git a/mysql-test/suite/innodb/r/innodb_sys_semaphore_waits.result b/mysql-test/suite/innodb/r/innodb_sys_semaphore_waits.result deleted file mode 100644 index 65d0a0bde43..00000000000 --- a/mysql-test/suite/innodb/r/innodb_sys_semaphore_waits.result +++ /dev/null @@ -1,27 +0,0 @@ -connect con1,localhost,root,,; -connect con2,localhost,root,,; -drop table if exists t1; -connection con1; -create table t1 (id integer, x integer) engine = InnoDB; -insert into t1 values(0, 0); -SET @saved_dbug = @@SESSION.debug_dbug; -set DEBUG_DBUG='+d,fatal-semaphore-timeout'; -set autocommit=0; -# Sending query on con1, -# the session will hold lock table mutex and sleep -SELECT * from t1 where id = 0 FOR UPDATE; -connection con2; -set autocommit=0; -# Sending query on con2, -# the session will be blocked on the lock table mutex and -# thus be put into sync arry -SELECT * from t1 where id = 0 FOR UPDATE; -connection default; -# Waitting for mysqld to crash -# Mysqld crash was detected -# Waitting for reconnect after mysqld restarts -# Reconnected after mysqld was successfully restarted -# Cleaning up before exit -SET debug_dbug = @saved_dbug; -drop table if exists t1; -# Clean exit diff --git a/mysql-test/suite/innodb/t/information_schema_grants.opt b/mysql-test/suite/innodb/t/information_schema_grants.opt index 4418a044161..74a9bcfe284 100644 --- a/mysql-test/suite/innodb/t/information_schema_grants.opt +++ b/mysql-test/suite/innodb/t/information_schema_grants.opt @@ -26,5 +26,4 @@ --enable-plugin-innodb-sys-foreign-cols --enable-plugin-innodb-sys-tablespaces --enable-plugin-innodb-sys-virtual ---enable-plugin-innodb-sys-semaphore-waits --enable-plugin-innodb-tablespaces-encryption diff --git a/mysql-test/suite/innodb/t/information_schema_grants.test b/mysql-test/suite/innodb/t/information_schema_grants.test index 92a6ac9731b..8960db9aad9 100644 --- a/mysql-test/suite/innodb/t/information_schema_grants.test +++ b/mysql-test/suite/innodb/t/information_schema_grants.test @@ -79,9 +79,6 @@ create sql security definer view d_sys_foreign_cols as select * from information create sql security invoker view i_sys_indexes as select * from information_schema.innodb_sys_indexes; create sql security definer view d_sys_indexes as select * from information_schema.innodb_sys_indexes; -create sql security invoker view i_sys_semaphore_waits as select * from information_schema.innodb_sys_semaphore_waits; -create sql security definer view d_sys_semaphore_waits as select * from information_schema.innodb_sys_semaphore_waits; - create sql security invoker view i_sys_tables as select * from information_schema.innodb_sys_tables; create sql security definer view d_sys_tables as select * from information_schema.innodb_sys_tables; @@ -236,12 +233,6 @@ select count(*) > -1 from information_schema.innodb_sys_indexes; select count(*) > -1 from i_sys_indexes; select count(*) > -1 from d_sys_indexes; ---error ER_SPECIFIC_ACCESS_DENIED_ERROR -select count(*) > -1 from information_schema.innodb_sys_semaphore_waits; ---error ER_SPECIFIC_ACCESS_DENIED_ERROR -select count(*) > -1 from i_sys_semaphore_waits; -select count(*) > -1 from d_sys_semaphore_waits; - --error ER_SPECIFIC_ACCESS_DENIED_ERROR select count(*) > -1 from information_schema.innodb_sys_tables; --error ER_SPECIFIC_ACCESS_DENIED_ERROR diff --git a/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.opt b/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.opt index 96d7874f169..f34d023228c 100644 --- a/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.opt +++ b/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.opt @@ -59,4 +59,3 @@ --loose-innodb_sys_datafiles --loose-innodb_changed_pages --loose-innodb_tablespaces_encryption ---loose-innodb_sys_semaphore_waits diff --git a/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test b/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test index ffcca55953d..e3885f18047 100644 --- a/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test +++ b/mysql-test/suite/innodb/t/innodb_skip_innodb_is_tables.test @@ -27,4 +27,3 @@ select * from information_schema.innodb_sys_foreign; select * from information_schema.innodb_sys_foreign_cols; select * from information_schema.innodb_sys_tablespaces; select * from information_schema.innodb_tablespaces_encryption; -select * from information_schema.innodb_sys_semaphore_waits; diff --git a/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits-master.opt b/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits-master.opt deleted file mode 100644 index dbac5bb16a9..00000000000 --- a/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits-master.opt +++ /dev/null @@ -1,2 +0,0 @@ ---innodb-fatal-semaphore-wait-threshold=1 ---innodb-sys-semaphore-waits=1 diff --git a/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test b/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test deleted file mode 100644 index ccd9e3d70f4..00000000000 --- a/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test +++ /dev/null @@ -1,115 +0,0 @@ ---source include/have_innodb.inc ---source include/not_windows.inc ---source include/not_valgrind.inc ---source include/not_embedded.inc -# DEBUG_SYNC must be compiled in. ---source include/have_debug_sync.inc - -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); - ---disable_warnings -drop table if exists t1; ---enable_warnings - -connection con1; -eval create table t1 (id integer, x integer) engine = InnoDB; -insert into t1 values(0, 0); - -# Enable the debug injection. -SET @saved_dbug = @@SESSION.debug_dbug; -set DEBUG_DBUG='+d,fatal-semaphore-timeout'; -set autocommit=0; - -# The following query will hang for an hour since the debug injection -# code will sleep an hour after holding the lock table mutex ---echo # Sending query on con1, ---echo # the session will hold lock table mutex and sleep ---send -SELECT * from t1 where id = 0 FOR UPDATE; - -# To make sure con1 holding the lock table mutex and sleeping ---sleep 2 - -connection con2; -set autocommit=0; - -# The following query will be blocked on the lock table mutex held by -# con1 so it will be put into sync array. ---echo # Sending query on con2, ---echo # the session will be blocked on the lock table mutex and ---echo # thus be put into sync arry ---send -SELECT * from t1 where id = 0 FOR UPDATE; - -# Waitting for mysqld to abort due to fatal semaphore timeout. -# Please note that, in the master.opt file, the fatal timeout -# was set to 1 second, but in mysqld debug mode, this timeout -# value will be timed 10 because UNIV_DEBUG_VALGRIND is set -# (see sync_array_print_long_waits_low() in storage/innobase/sync/sync0arr.cc) -# so the actual timeout will be 1 * 10 = 10 seconds. Besides, -# mysqld will abort after detecting this fatal timeout 10 times in -# a loop with interval of 1 second (see srv_error_monitor_thread -# thread in torage/innobase/srv/srv0srv.cc), so mysqld will abort -# in 1 * 10 + 1 * 10 = 20 seconds after con2 being blocked on -# the lock table mutex. -# -# P.S. the default fatal sempahore timeout is 600 seconds, -# so mysqld will abort after 600 * 10 + 1 * 10 = 6010 seconds -# in debug mode and 600 + 1 * 10 = 610 seconds in release mode. - -connection default; - ---disable_result_log ---disable_query_log - -# Since this test generates lot of errors in log, suppress checking errors -call mtr.add_suppression(".*"); - -# The crash is expected -exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect; - ---echo # Waitting for mysqld to crash - -# It will take 20 seconds to detect the long semaphore and mysqld to abort. -# This test will be treated as pass as long as mysqld crash/restart is dectected -# in 80 seconds. -let $counter= 80; -let $mysql_errno= 0; -while (!$mysql_errno) -{ - --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013 - show status; - - --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013 - select * from information_schema.innodb_sys_semaphore_waits; - - dec $counter; - if (!$counter) - { - # This will fail this test. - --die Server failed to dissapear - } - --sleep 1 -} - ---echo # Mysqld crash was detected ---echo # Waitting for reconnect after mysqld restarts - -enable_reconnect; -connection default; - ---exec echo "restart:--log-error=$error_log" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - -# Call script that will poll the server waiting for it to be back online again -source include/wait_until_connected_again.inc; - ---echo # Reconnected after mysqld was successfully restarted - ---echo # Cleaning up before exit ---disable_warnings -SET debug_dbug = @saved_dbug; -drop table if exists t1; ---enable_warnings - ---echo # Clean exit diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.opt b/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.opt deleted file mode 100644 index 2b4bd0c33da..00000000000 --- a/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb_sys_semaphore_waits diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.result b/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.result deleted file mode 100644 index ee1e3fade1e..00000000000 --- a/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.result +++ /dev/null @@ -1,24 +0,0 @@ -SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS; -Table Create Table -INNODB_SYS_SEMAPHORE_WAITS CREATE TEMPORARY TABLE `INNODB_SYS_SEMAPHORE_WAITS` ( - `THREAD_ID` bigint(21) unsigned NOT NULL DEFAULT 0, - `OBJECT_NAME` varchar(4000) DEFAULT NULL, - `FILE` varchar(4000) DEFAULT NULL, - `LINE` int(11) unsigned NOT NULL DEFAULT 0, - `WAIT_TIME` bigint(21) unsigned NOT NULL DEFAULT 0, - `WAIT_OBJECT` bigint(21) unsigned NOT NULL DEFAULT 0, - `WAIT_TYPE` varchar(16) DEFAULT NULL, - `HOLDER_THREAD_ID` bigint(21) unsigned NOT NULL DEFAULT 0, - `HOLDER_FILE` varchar(4000) DEFAULT NULL, - `HOLDER_LINE` int(11) unsigned NOT NULL DEFAULT 0, - `CREATED_FILE` varchar(4000) DEFAULT NULL, - `CREATED_LINE` int(11) unsigned NOT NULL DEFAULT 0, - `WRITER_THREAD` bigint(21) unsigned NOT NULL DEFAULT 0, - `RESERVATION_MODE` varchar(16) DEFAULT NULL, - `READERS` int(11) unsigned NOT NULL DEFAULT 0, - `WAITERS_FLAG` bigint(21) unsigned NOT NULL DEFAULT 0, - `LOCK_WORD` bigint(21) unsigned NOT NULL DEFAULT 0, - `LAST_WRITER_FILE` varchar(4000) DEFAULT NULL, - `LAST_WRITER_LINE` int(11) unsigned NOT NULL DEFAULT 0, - `OS_WAIT_COUNT` int(11) unsigned NOT NULL DEFAULT 0 -) ENGINE=MEMORY DEFAULT CHARSET=utf8 diff --git a/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.test b/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.test deleted file mode 100644 index a8ea1c59bb8..00000000000 --- a/mysql-test/suite/innodb_i_s/innodb_sys_semaphore_waits.test +++ /dev/null @@ -1,3 +0,0 @@ ---source include/have_innodb.inc - -SHOW CREATE TABLE INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS; diff --git a/mysql-test/suite/sys_vars/r/innodb_sync_array_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_sync_array_size_basic.result deleted file mode 100644 index 526dd7d8350..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_sync_array_size_basic.result +++ /dev/null @@ -1,30 +0,0 @@ -Valid values are between 0 and 1024 -SELECT @@global.innodb_sync_array_size between 0 and 1024; -@@global.innodb_sync_array_size between 0 and 1024 -1 -SELECT @@global.innodb_sync_array_size; -@@global.innodb_sync_array_size -1 -SELECT @@session.innodb_sync_array_size; -ERROR HY000: Variable 'innodb_sync_array_size' is a GLOBAL variable -SHOW GLOBAL variables LIKE 'innodb_sync_array_size'; -Variable_name Value -innodb_sync_array_size 1 -SHOW SESSION variables LIKE 'innodb_sync_array_size'; -Variable_name Value -innodb_sync_array_size 1 -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_sync_array_size'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_SYNC_ARRAY_SIZE 1 -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_sync_array_size'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_SYNC_ARRAY_SIZE 1 -SET GLOBAL innodb_sync_array_size=10; -ERROR HY000: Variable 'innodb_sync_array_size' is a read only variable -SET SESSION innodb_sync_array_size=10; -ERROR HY000: Variable 'innodb_sync_array_size' is a read only variable -SELECT @@global.innodb_sync_array_size; -@@global.innodb_sync_array_size -1 diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index ae389b22d2a..be8e3c5ec83 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -1665,18 +1665,6 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST OFF,ON READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL -VARIABLE_NAME INNODB_SYNC_ARRAY_SIZE -SESSION_VALUE NULL -DEFAULT_VALUE 1 -VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT Size of the mutex/lock wait array. -NUMERIC_MIN_VALUE 1 -NUMERIC_MAX_VALUE 1024 -NUMERIC_BLOCK_SIZE 0 -ENUM_VALUE_LIST NULL -READ_ONLY YES -COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME INNODB_SYNC_DEBUG SESSION_VALUE NULL DEFAULT_VALUE OFF diff --git a/mysql-test/suite/sys_vars/t/innodb_sync_array_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_sync_array_size_basic.test deleted file mode 100644 index 39ff69affea..00000000000 --- a/mysql-test/suite/sys_vars/t/innodb_sync_array_size_basic.test +++ /dev/null @@ -1,29 +0,0 @@ -# 2010-01-27 - Added - ---source include/have_innodb.inc - -# Exists as global only -# ---echo Valid values are between 0 and 1024 -SELECT @@global.innodb_sync_array_size between 0 and 1024; -SELECT @@global.innodb_sync_array_size; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT @@session.innodb_sync_array_size; - -SHOW GLOBAL variables LIKE 'innodb_sync_array_size'; -SHOW SESSION variables LIKE 'innodb_sync_array_size'; ---disable_warnings -SELECT * FROM information_schema.global_variables -WHERE variable_name='innodb_sync_array_size'; -SELECT * FROM information_schema.session_variables -WHERE variable_name='innodb_sync_array_size'; ---enable_warnings - -# -# Show that it's read-only -# ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET GLOBAL innodb_sync_array_size=10; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET SESSION innodb_sync_array_size=10; -SELECT @@global.innodb_sync_array_size; diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index c903b3af5e1..758e6557bd2 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -469,7 +469,6 @@ innodb.innodb_stats : MDEV-10682 - wrong result innodb.innodb_stats_drop_locked : Modified in 10.5.7 innodb.innodb_stats_persistent : MDEV-21567 - Wrong result in execution plan innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed -innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait innodb.innodb_trx_weight : Configuration deleted in 10.5.7 innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks innodb.instant_alter_bugs : Modified in 10.5.7 diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d1b17acce29..a045dfbe2d0 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5049,6 +5049,7 @@ static int init_server_components() MARIADB_REMOVED_OPTION("innodb-replication-delay"), MARIADB_REMOVED_OPTION("innodb-scrub-log"), MARIADB_REMOVED_OPTION("innodb-scrub-log-speed"), + MARIADB_REMOVED_OPTION("innodb-sync-array-size"), MARIADB_REMOVED_OPTION("innodb-thread-concurrency"), MARIADB_REMOVED_OPTION("innodb-thread-sleep-delay"), MARIADB_REMOVED_OPTION("innodb-undo-logs"), diff --git a/sql/upgrade_conf_file.cc b/sql/upgrade_conf_file.cc index e2db046a372..09bd2866798 100644 --- a/sql/upgrade_conf_file.cc +++ b/sql/upgrade_conf_file.cc @@ -123,6 +123,7 @@ static const char *removed_variables[] = "innodb_stats_sample_pages", "innodb_stats_update_need_lock", "innodb_support_xa", +"innodb_sync_array_size", "innodb_thread_concurrency", "innodb_thread_concurrency_timer_based", "innodb_thread_sleep_delay", diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index 530124e16aa..5a5c268763a 100644 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -187,7 +187,6 @@ SET(INNOBASE_SOURCES include/mtr0mtr.h include/mtr0mtr.ic include/mtr0types.h - include/os0event.h include/os0file.h include/os0file.ic include/os0thread.h @@ -239,8 +238,6 @@ SET(INNOBASE_SOURCES include/srv0mon.ic include/srv0srv.h include/srv0start.h - include/sync0arr.h - include/sync0arr.ic include/sync0debug.h include/sync0policy.h include/sux_lock.h @@ -294,7 +291,6 @@ SET(INNOBASE_SOURCES mem/mem0mem.cc mtr/mtr0mtr.cc os/os0file.cc - os/os0event.cc os/os0thread.cc page/page0cur.cc page/page0page.cc @@ -328,7 +324,6 @@ SET(INNOBASE_SOURCES srv/srv0srv.cc srv/srv0start.cc sync/srw_lock.cc - sync/sync0arr.cc sync/sync0debug.cc sync/sync0sync.cc trx/trx0i_s.cc diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 9393761974a..e38cccf0f34 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -18444,14 +18444,6 @@ static MYSQL_SYSVAR_UINT(purge_threads, srv_n_purge_threads, "Number of tasks for purging transaction history", NULL, NULL, 4, 1, innodb_purge_threads_MAX, 0); -static MYSQL_SYSVAR_ULONG(sync_array_size, srv_sync_array_size, - PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, - "Size of the mutex/lock wait array.", - NULL, NULL, - 1, /* Default setting */ - 1, /* Minimum value */ - 1024, 0); /* Maximum value */ - static MYSQL_SYSVAR_UINT(fast_shutdown, srv_fast_shutdown, PLUGIN_VAR_OPCMDARG, "Speeds up the shutdown process of the InnoDB storage engine. Possible" @@ -19471,7 +19463,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(undo_log_truncate), MYSQL_SYSVAR(undo_directory), MYSQL_SYSVAR(undo_tablespaces), - MYSQL_SYSVAR(sync_array_size), MYSQL_SYSVAR(compression_failure_threshold_pct), MYSQL_SYSVAR(compression_pad_pct_max), MYSQL_SYSVAR(default_row_format), @@ -19554,7 +19545,6 @@ i_s_innodb_sys_foreign, i_s_innodb_sys_foreign_cols, i_s_innodb_sys_tablespaces, i_s_innodb_sys_virtual, -i_s_innodb_sys_semaphore_waits, i_s_innodb_tablespaces_encryption maria_declare_plugin_end; diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc index 6eaacfd800a..6314bdc940d 100644 --- a/storage/innobase/handler/i_s.cc +++ b/storage/innobase/handler/i_s.cc @@ -22,7 +22,6 @@ this program; if not, write to the Free Software Foundation, Inc., InnoDB INFORMATION SCHEMA tables interface to MySQL. Created July 18, 2007 Vasil Dimov -Modified Dec 29, 2014 Jan Lindström (Added sys_semaphore_waits) *******************************************************/ #include "univ.i" @@ -54,7 +53,6 @@ Modified Dec 29, 2014 Jan Lindström (Added sys_semaphore_waits) #include "fts0priv.h" #include "btr0btr.h" #include "page0zip.h" -#include "sync0arr.h" #include "fil0fil.h" #include "fil0crypt.h" #include "dict0crea.h" @@ -171,20 +169,6 @@ time_t MYSQL_TYPE_DATETIME --------------------------------- */ -/** Implemented on sync0arr.cc */ -/*******************************************************************//** -Function to populate INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS table. -Loop through each item on sync array, and extract the column -information and fill the INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS table. -@return 0 on success */ -UNIV_INTERN -int -sync_arr_fill_sys_semphore_waits_table( -/*===================================*/ - THD* thd, /*!< in: thread */ - TABLE_LIST* tables, /*!< in/out: tables to fill */ - Item* ); /*!< in: condition (not used) */ - /*******************************************************************//** Common function to fill any of the dynamic tables: INFORMATION_SCHEMA.innodb_trx @@ -245,6 +229,7 @@ field_store_time_t( /*******************************************************************//** Auxiliary function to store char* value in MYSQL_TYPE_STRING field. @return 0 on success */ +static int field_store_string( /*===============*/ @@ -6879,143 +6864,3 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_tablespaces_encryption = STRUCT_FLD(version_info, INNODB_VERSION_STR), STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE) }; - -namespace Show { -/* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS */ -static ST_FIELD_INFO innodb_sys_semaphore_waits_fields_info[] = -{ - // SYS_SEMAPHORE_WAITS_THREAD_ID 0 - Column("THREAD_ID", ULonglong(), NOT_NULL), - - // SYS_SEMAPHORE_WAITS_OBJECT_NAME 1 - Column("OBJECT_NAME", Varchar(OS_FILE_MAX_PATH), NULLABLE), - - // SYS_SEMAPHORE_WAITS_FILE 2 - Column("FILE", Varchar(OS_FILE_MAX_PATH), NULLABLE), - - // SYS_SEMAPHORE_WAITS_LINE 3 - Column("LINE", ULong(), NOT_NULL), - - // SYS_SEMAPHORE_WAITS_WAIT_TIME 4 - Column("WAIT_TIME", ULonglong(), NOT_NULL), - - // SYS_SEMAPHORE_WAITS_WAIT_OBJECT 5 - Column("WAIT_OBJECT", ULonglong(), NOT_NULL), - - // SYS_SEMAPHORE_WAITS_WAIT_TYPE 6 - Column("WAIT_TYPE", Varchar(16), NULLABLE), - - // SYS_SEMAPHORE_WAITS_HOLDER_THREAD_ID 7 - Column("HOLDER_THREAD_ID", ULonglong(), NOT_NULL), - - // SYS_SEMAPHORE_WAITS_HOLDER_FILE 8 - Column("HOLDER_FILE", Varchar(OS_FILE_MAX_PATH), NULLABLE), - - // SYS_SEMAPHORE_WAITS_HOLDER_LINE 9 - Column("HOLDER_LINE", ULong(), NOT_NULL), - - // SYS_SEMAPHORE_WAITS_CREATED_FILE 10 - Column("CREATED_FILE", Varchar(OS_FILE_MAX_PATH), NULLABLE), - - // SYS_SEMAPHORE_WAITS_CREATED_LINE 11 - Column("CREATED_LINE", ULong(), NOT_NULL), - - // SYS_SEMAPHORE_WAITS_WRITER_THREAD 12 - Column("WRITER_THREAD", ULonglong(), NOT_NULL), - - // SYS_SEMAPHORE_WAITS_RESERVATION_MODE 13 - Column("RESERVATION_MODE", Varchar(16), NULLABLE), - - // SYS_SEMAPHORE_WAITS_READERS 14 - Column("READERS", ULong(), NOT_NULL), - - // SYS_SEMAPHORE_WAITS_WAITERS_FLAG 15 - Column("WAITERS_FLAG", ULonglong(), NOT_NULL), - - // SYS_SEMAPHORE_WAITS_LOCK_WORD 16 - Column("LOCK_WORD", ULonglong(), NOT_NULL), - - // SYS_SEMAPHORE_WAITS_LAST_WRITER_FILE 17 - Column("LAST_WRITER_FILE", Varchar(OS_FILE_MAX_PATH), NULLABLE), - - // SYS_SEMAPHORE_WAITS_LAST_WRITER_LINE 18 - Column("LAST_WRITER_LINE", ULong(), NOT_NULL), - - // SYS_SEMAPHORE_WAITS_OS_WAIT_COUNT 19 - Column("OS_WAIT_COUNT", ULong(), NOT_NULL), - - CEnd() -}; -} // namespace Show - - - -/*******************************************************************//** -Bind the dynamic table INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS -@return 0 on success */ -static -int -innodb_sys_semaphore_waits_init( -/*============================*/ - void* p) /*!< in/out: table schema object */ -{ - ST_SCHEMA_TABLE* schema; - - DBUG_ENTER("innodb_sys_semaphore_waits_init"); - - schema = (ST_SCHEMA_TABLE*) p; - - schema->fields_info = Show::innodb_sys_semaphore_waits_fields_info; - schema->fill_table = sync_arr_fill_sys_semphore_waits_table; - - DBUG_RETURN(0); -} - -UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_semaphore_waits = -{ - /* the plugin type (a MYSQL_XXX_PLUGIN value) */ - /* int */ - STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN), - - /* pointer to type-specific plugin descriptor */ - /* void* */ - STRUCT_FLD(info, &i_s_info), - - /* plugin name */ - /* const char* */ - STRUCT_FLD(name, "INNODB_SYS_SEMAPHORE_WAITS"), - - /* plugin author (for SHOW PLUGINS) */ - /* const char* */ - STRUCT_FLD(author, maria_plugin_author), - - /* general descriptive text (for SHOW PLUGINS) */ - /* const char* */ - STRUCT_FLD(descr, "InnoDB SYS_SEMAPHORE_WAITS"), - - /* the plugin license (PLUGIN_LICENSE_XXX) */ - /* int */ - STRUCT_FLD(license, PLUGIN_LICENSE_GPL), - - /* the function to invoke when plugin is loaded */ - /* int (*)(void*); */ - STRUCT_FLD(init, innodb_sys_semaphore_waits_init), - - /* the function to invoke when plugin is unloaded */ - /* int (*)(void*); */ - STRUCT_FLD(deinit, i_s_common_deinit), - - /* plugin version (for SHOW PLUGINS) */ - /* unsigned int */ - STRUCT_FLD(version, INNODB_VERSION_SHORT), - - /* struct st_mysql_show_var* */ - STRUCT_FLD(status_vars, NULL), - - /* struct st_mysql_sys_var** */ - STRUCT_FLD(system_vars, NULL), - - /* Maria extension */ - STRUCT_FLD(version_info, INNODB_VERSION_STR), - STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE), -}; diff --git a/storage/innobase/handler/i_s.h b/storage/innobase/handler/i_s.h index 9947721407a..395bc3e7909 100644 --- a/storage/innobase/handler/i_s.h +++ b/storage/innobase/handler/i_s.h @@ -61,7 +61,6 @@ extern struct st_maria_plugin i_s_innodb_sys_foreign_cols; extern struct st_maria_plugin i_s_innodb_sys_tablespaces; extern struct st_maria_plugin i_s_innodb_sys_virtual; extern struct st_maria_plugin i_s_innodb_tablespaces_encryption; -extern struct st_maria_plugin i_s_innodb_sys_semaphore_waits; /** The latest successfully looked up innodb_fts_aux_table */ extern table_id_t innodb_ft_aux_table_id; @@ -99,47 +98,4 @@ do { \ #define STRUCT_FLD(name, value) value #endif -/* Don't use a static const variable here, as some C++ compilers (notably -HPUX aCC: HP ANSI C++ B3910B A.03.65) can't handle it. */ -#define END_OF_ST_FIELD_INFO \ - {STRUCT_FLD(field_name, NULL), \ - STRUCT_FLD(field_length, 0), \ - STRUCT_FLD(field_type, MYSQL_TYPE_NULL), \ - STRUCT_FLD(value, 0), \ - STRUCT_FLD(field_flags, 0), \ - STRUCT_FLD(old_name, ""), \ - STRUCT_FLD(open_method, SKIP_OPEN_TABLE)} - -/** Fields on INFORMATION_SCHEMA.SYS_SEMAMPHORE_WAITS table */ -#define SYS_SEMAPHORE_WAITS_THREAD_ID 0 -#define SYS_SEMAPHORE_WAITS_OBJECT_NAME 1 -#define SYS_SEMAPHORE_WAITS_FILE 2 -#define SYS_SEMAPHORE_WAITS_LINE 3 -#define SYS_SEMAPHORE_WAITS_WAIT_TIME 4 -#define SYS_SEMAPHORE_WAITS_WAIT_OBJECT 5 -#define SYS_SEMAPHORE_WAITS_WAIT_TYPE 6 -#define SYS_SEMAPHORE_WAITS_HOLDER_THREAD_ID 7 -#define SYS_SEMAPHORE_WAITS_HOLDER_FILE 8 -#define SYS_SEMAPHORE_WAITS_HOLDER_LINE 9 -#define SYS_SEMAPHORE_WAITS_CREATED_FILE 10 -#define SYS_SEMAPHORE_WAITS_CREATED_LINE 11 -#define SYS_SEMAPHORE_WAITS_WRITER_THREAD 12 -#define SYS_SEMAPHORE_WAITS_RESERVATION_MODE 13 -#define SYS_SEMAPHORE_WAITS_READERS 14 -#define SYS_SEMAPHORE_WAITS_WAITERS_FLAG 15 -#define SYS_SEMAPHORE_WAITS_LOCK_WORD 16 -#define SYS_SEMAPHORE_WAITS_LAST_WRITER_FILE 17 -#define SYS_SEMAPHORE_WAITS_LAST_WRITER_LINE 18 -#define SYS_SEMAPHORE_WAITS_OS_WAIT_COUNT 19 - -/*******************************************************************//** -Auxiliary function to store char* value in MYSQL_TYPE_STRING field. -@return 0 on success */ -int -field_store_string( -/*===============*/ - Field* field, /*!< in/out: target field for storage */ - const char* str); /*!< in: NUL-terminated utf-8 string, - or NULL */ - #endif /* i_s_h */ diff --git a/storage/innobase/include/ib0mutex.h b/storage/innobase/include/ib0mutex.h index 781b688e0b1..b83a1aac419 100644 --- a/storage/innobase/include/ib0mutex.h +++ b/storage/innobase/include/ib0mutex.h @@ -30,8 +30,6 @@ Created 2013-03-26 Sunny Bains. #define ib0mutex_h #include "my_cpu.h" -#include "os0event.h" -#include "sync0arr.h" /** OS mutex for tracking lock/unlock for debugging */ template