Commit 51bc4074 authored by Marko Mäkelä's avatar Marko Mäkelä

Remove dead code for "InnoDB table(space) monitor"

Starting with MySQL 5.7 (or MariaDB 10.2.2) InnoDB no longer contains
the "table monitor" or "tablespace monitor". The conditions on
srv_print_innodb_tablespace_monitor, srv_print_innodb_table_monitor
never hold. So, the code was dead.

Also, remove a bogus reference to dict_print(), which used to implement
the InnoDB table monitor.
parent bf963106
......@@ -377,8 +377,7 @@ dict_getnext_system(
/********************************************************************//**
This function processes one SYS_TABLES record and populate the dict_table_t
struct for the table. Extracted out of dict_print() to be used by
both monitor table output and information schema innodb_sys_tables output.
struct for the table.
@return error message, or NULL on success */
const char*
dict_process_sys_tables_rec_and_mtr_commit(
......
......@@ -193,8 +193,7 @@ dict_getnext_system(
mtr_t* mtr); /*!< in: the mini-transaction */
/********************************************************************//**
This function processes one SYS_TABLES record and populate the dict_table_t
struct for the table. Extracted out of dict_print() to be used by
both monitor table output and information schema innodb_sys_tables output.
struct for the table.
@return error message, or NULL on success */
const char*
dict_process_sys_tables_rec_and_mtr_commit(
......
......@@ -454,8 +454,6 @@ stderr on startup/shutdown. Not enabled on the embedded server. */
ibool srv_print_verbose_log;
my_bool srv_print_innodb_monitor;
my_bool srv_print_innodb_lock_monitor;
my_bool srv_print_innodb_tablespace_monitor;
my_bool srv_print_innodb_table_monitor;
/** innodb_force_primary_key; whether to disallow CREATE TABLE without
PRIMARY KEY */
my_bool srv_force_primary_key;
......@@ -1713,8 +1711,6 @@ DECLARE_THREAD(srv_monitor_thread)(void*)
double time_elapsed;
time_t current_time;
time_t last_monitor_time;
time_t last_table_monitor_time;
time_t last_tablespace_monitor_time;
ulint mutex_skipped;
ibool last_srv_print_monitor;
......@@ -1730,8 +1726,6 @@ DECLARE_THREAD(srv_monitor_thread)(void*)
#endif /* UNIV_PFS_THREAD */
srv_last_monitor_time = ut_time();
last_table_monitor_time = ut_time();
last_tablespace_monitor_time = ut_time();
last_monitor_time = ut_time();
mutex_skipped = 0;
last_srv_print_monitor = srv_print_innodb_monitor;
......@@ -1791,60 +1785,6 @@ DECLARE_THREAD(srv_monitor_thread)(void*)
os_file_set_eof(srv_monitor_file);
mutex_exit(&srv_monitor_file_mutex);
}
if (srv_print_innodb_tablespace_monitor
&& difftime(current_time,
last_tablespace_monitor_time) > 60) {
last_tablespace_monitor_time = ut_time();
fputs("========================"
"========================\n",
stderr);
ut_print_timestamp(stderr);
fputs(" INNODB TABLESPACE MONITOR OUTPUT\n"
"========================"
"========================\n",
stderr);
// JAN: TODO: MySQL 5.7
//fsp_print(0);
//fputs("Validating tablespace\n", stderr);
//fsp_validate(0);
fputs("Validation ok\n"
"---------------------------------------\n"
"END OF INNODB TABLESPACE MONITOR OUTPUT\n"
"=======================================\n",
stderr);
}
if (srv_print_innodb_table_monitor
&& difftime(current_time, last_table_monitor_time) > 60) {
last_table_monitor_time = ut_time();
// fprintf(stderr, "Warning: %s\n",
// DEPRECATED_MSG_INNODB_TABLE_MONITOR);
fputs("===========================================\n",
stderr);
ut_print_timestamp(stderr);
fputs(" INNODB TABLE MONITOR OUTPUT\n"
"===========================================\n",
stderr);
// dict_print();
fputs("-----------------------------------\n"
"END OF INNODB TABLE MONITOR OUTPUT\n"
"==================================\n",
stderr);
//fprintf(stderr, "Warning: %s\n",
// DEPRECATED_MSG_INNODB_TABLE_MONITOR);
}
}
if (srv_shutdown_state != SRV_SHUTDOWN_NONE) {
......@@ -1852,9 +1792,7 @@ DECLARE_THREAD(srv_monitor_thread)(void*)
}
if (srv_print_innodb_monitor
|| srv_print_innodb_lock_monitor
|| srv_print_innodb_tablespace_monitor
|| srv_print_innodb_table_monitor) {
|| srv_print_innodb_lock_monitor) {
goto loop;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment