mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Delete unused global variables from mysqld.h
Several variables declared in mysqld.h appear to be old system variables that have been left over after deprecation. Delete them using IDE refactoring to automatically search for other uses. Most cases had no other uses in the code. slave_allow_batching had a test that was effectively unused, as the result was only -ERROR HY000: Unknown system variable 'slave_allow_batching' so that was deleted as well. Build and test still works without issue as expected. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services.
This commit is contained in:
committed by
Andrew Hutchings
parent
7c5fdc9b6a
commit
becc8372c7
@@ -453,7 +453,7 @@ my_bool opt_master_verify_checksum= 0;
|
||||
my_bool opt_slave_sql_verify_checksum= 1;
|
||||
const char *binlog_format_names[]= {"MIXED", "STATEMENT", "ROW", NullS};
|
||||
volatile sig_atomic_t calling_initgroups= 0; /**< Used in SIGSEGV handler. */
|
||||
uint mysqld_port, select_errors, dropping_tables, ha_open_options;
|
||||
uint mysqld_port, select_errors, ha_open_options;
|
||||
uint mysqld_extra_port;
|
||||
uint mysqld_port_timeout;
|
||||
ulong delay_key_write_options;
|
||||
@@ -7902,7 +7902,7 @@ static int mysql_init_variables(void)
|
||||
disable_log_notes= 0;
|
||||
mqh_used= 0;
|
||||
cleanup_done= 0;
|
||||
select_errors= dropping_tables= ha_open_options=0;
|
||||
select_errors= ha_open_options= 0;
|
||||
THD_count::count= CONNECT::count= 0;
|
||||
slave_open_temp_tables= 0;
|
||||
opt_endinfo= using_udf_functions= 0;
|
||||
@@ -9787,33 +9787,22 @@ static PSI_memory_info all_server_memory[]=
|
||||
{ &key_memory_locked_table_list, "Locked_tables_list::m_locked_tables_root", 0},
|
||||
{ &key_memory_locked_thread_list, "display_table_locks", PSI_FLAG_THREAD},
|
||||
{ &key_memory_thd_transactions, "THD::transactions::mem_root", PSI_FLAG_THREAD},
|
||||
// { &key_memory_delegate, "Delegate::memroot", 0},
|
||||
{ &key_memory_acl_mem, "sql_acl_mem", PSI_FLAG_GLOBAL},
|
||||
{ &key_memory_acl_memex, "sql_acl_memex", PSI_FLAG_GLOBAL},
|
||||
{ &key_memory_acl_cache, "acl_cache", PSI_FLAG_GLOBAL},
|
||||
{ &key_memory_thd_main_mem_root, "thd::main_mem_root", PSI_FLAG_THREAD},
|
||||
// { &key_memory_help, "help", 0},
|
||||
// { &key_memory_new_frm_mem, "new_frm_mem", 0},
|
||||
{ &key_memory_table_share, "TABLE_SHARE::mem_root", PSI_FLAG_GLOBAL}, /* table definition cache */
|
||||
{ &key_memory_gdl, "gdl", 0},
|
||||
{ &key_memory_table_triggers_list, "Table_triggers_list", 0},
|
||||
// { &key_memory_servers, "servers", 0},
|
||||
{ &key_memory_prepared_statement_map, "Prepared_statement_map", PSI_FLAG_THREAD},
|
||||
{ &key_memory_prepared_statement_main_mem_root, "Prepared_statement::main_mem_root", PSI_FLAG_THREAD},
|
||||
// { &key_memory_protocol_rset_root, "Protocol_local::m_rset_root", PSI_FLAG_THREAD},
|
||||
// { &key_memory_warning_info_warn_root, "Warning_info::m_warn_root", PSI_FLAG_THREAD},
|
||||
{ &key_memory_sp_cache, "THD::sp_cache", 0},
|
||||
{ &key_memory_sp_head_main_root, "sp_head::main_mem_root", 0},
|
||||
{ &key_memory_sp_head_execute_root, "sp_head::execute_mem_root", PSI_FLAG_THREAD},
|
||||
{ &key_memory_sp_head_call_root, "sp_head::call_mem_root", PSI_FLAG_THREAD},
|
||||
{ &key_memory_table_mapping_root, "table_mapping::m_mem_root", 0},
|
||||
{ &key_memory_quick_range_select_root, "QUICK_RANGE_SELECT::alloc", PSI_FLAG_THREAD},
|
||||
// { &key_memory_quick_index_merge_root, "QUICK_INDEX_MERGE_SELECT::alloc", PSI_FLAG_THREAD},
|
||||
// { &key_memory_quick_ror_intersect_select_root, "QUICK_ROR_INTERSECT_SELECT::alloc", PSI_FLAG_THREAD},
|
||||
// { &key_memory_quick_ror_union_select_root, "QUICK_ROR_UNION_SELECT::alloc", PSI_FLAG_THREAD},
|
||||
// { &key_memory_quick_group_min_max_select_root, "QUICK_GROUP_MIN_MAX_SELECT::alloc", PSI_FLAG_THREAD},
|
||||
// { &key_memory_test_quick_select_exec, "test_quick_select", PSI_FLAG_THREAD},
|
||||
// { &key_memory_prune_partitions_exec, "prune_partitions::exec", 0},
|
||||
{ &key_memory_binlog_recover_exec, "MYSQL_BIN_LOG::recover", 0},
|
||||
{ &key_memory_blob_mem_storage, "Blob_mem_storage::storage", 0},
|
||||
{ &key_memory_NAMED_ILINK_name, "NAMED_ILINK::name", 0},
|
||||
@@ -9822,17 +9811,12 @@ static PSI_memory_info all_server_memory[]=
|
||||
{ &key_memory_queue_item, "Queue::queue_item", 0},
|
||||
{ &key_memory_THD_db, "THD::db", 0},
|
||||
{ &key_memory_user_var_entry, "user_var_entry", 0},
|
||||
// { &key_memory_Slave_job_group_group_relay_log_name, "Slave_job_group::group_relay_log_name", 0},
|
||||
{ &key_memory_Relay_log_info_group_relay_log_name, "Relay_log_info::group_relay_log_name", 0},
|
||||
{ &key_memory_binlog_cache_mngr, "binlog_cache_mngr", 0},
|
||||
{ &key_memory_binlog_gtid_index, "binlog_gtid_index", 0},
|
||||
{ &key_memory_Row_data_memory_memory, "Row_data_memory::memory", 0},
|
||||
// { &key_memory_Gtid_set_to_string, "Gtid_set::to_string", 0},
|
||||
// { &key_memory_Gtid_state_to_string, "Gtid_state::to_string", 0},
|
||||
// { &key_memory_Owned_gtids_to_string, "Owned_gtids::to_string", 0},
|
||||
// { &key_memory_log_event, "Log_event", 0},
|
||||
// { &key_memory_Incident_log_event_message, "Incident_log_event::message", 0},
|
||||
// { &key_memory_Rows_query_log_event_rows_query, "Rows_query_log_event::rows_query", 0},
|
||||
{ &key_memory_Sort_param_tmp_buffer, "Sort_param::tmp_buffer", 0},
|
||||
{ &key_memory_Filesort_info_merge, "Filesort_info::merge", 0},
|
||||
{ &key_memory_Filesort_info_record_pointers, "Filesort_info::record_pointers", 0},
|
||||
@@ -9845,7 +9829,6 @@ static PSI_memory_info all_server_memory[]=
|
||||
{ &key_memory_User_level_lock, "User_level_lock", 0},
|
||||
{ &key_memory_MYSQL_LOG_name, "MYSQL_LOG::name", 0},
|
||||
{ &key_memory_TC_LOG_MMAP_pages, "TC_LOG_MMAP::pages", 0},
|
||||
// { &key_memory_my_bitmap_map, "my_bitmap_map", 0},
|
||||
{ &key_memory_QUICK_RANGE_SELECT_mrr_buf_desc, "QUICK_RANGE_SELECT::mrr_buf_desc", 0},
|
||||
{ &key_memory_Event_queue_element_for_exec_names, "Event_queue_element_for_exec::names", 0},
|
||||
{ &key_memory_my_str_malloc, "my_str_malloc", 0},
|
||||
@@ -9856,39 +9839,21 @@ static PSI_memory_info all_server_memory[]=
|
||||
{ &key_memory_rpl_filter, "rpl_filter memory", 0},
|
||||
{ &key_memory_errmsgs, "errmsgs", 0},
|
||||
{ &key_memory_Gis_read_stream_err_msg, "Gis_read_stream::err_msg", 0},
|
||||
// { &key_memory_Geometry_objects_data, "Geometry::ptr_and_wkb_data", 0},
|
||||
{ &key_memory_MYSQL_LOCK, "MYSQL_LOCK", 0},
|
||||
// { &key_memory_NET_buff, "NET::buff", 0},
|
||||
// { &key_memory_NET_compress_packet, "NET::compress_packet", 0},
|
||||
{ &key_memory_Event_scheduler_scheduler_param, "Event_scheduler::scheduler_param", 0},
|
||||
// { &key_memory_Gtid_set_Interval_chunk, "Gtid_set::Interval_chunk", 0},
|
||||
// { &key_memory_Owned_gtids_sidno_to_hash, "Owned_gtids::sidno_to_hash", 0},
|
||||
// { &key_memory_Sid_map_Node, "Sid_map::Node", 0},
|
||||
// { &key_memory_Gtid_state_group_commit_sidno, "Gtid_state::group_commit_sidno_locks", 0},
|
||||
// { &key_memory_Mutex_cond_array_Mutex_cond, "Mutex_cond_array::Mutex_cond", 0},
|
||||
{ &key_memory_TABLE_RULE_ENT, "TABLE_RULE_ENT", 0},
|
||||
// { &key_memory_Rpl_info_table, "Rpl_info_table", 0},
|
||||
{ &key_memory_Rpl_info_file_buffer, "Rpl_info_file::buffer", 0},
|
||||
// { &key_memory_db_worker_hash_entry, "db_worker_hash_entry", 0},
|
||||
// { &key_memory_rpl_slave_check_temp_dir, "rpl_slave::check_temp_dir", 0},
|
||||
// { &key_memory_rpl_slave_command_buffer, "rpl_slave::command_buffer", 0},
|
||||
{ &key_memory_binlog_ver_1_event, "binlog_ver_1_event", 0},
|
||||
{ &key_memory_SLAVE_INFO, "SLAVE_INFO", 0},
|
||||
{ &key_memory_binlog_pos, "binlog_pos", 0},
|
||||
// { &key_memory_HASH_ROW_ENTRY, "HASH_ROW_ENTRY", 0},
|
||||
{ &key_memory_binlog_statement_buffer, "binlog_statement_buffer", 0},
|
||||
// { &key_memory_partition_syntax_buffer, "partition_syntax_buffer", 0},
|
||||
// { &key_memory_READ_INFO, "READ_INFO", 0},
|
||||
{ &key_memory_JOIN_CACHE, "JOIN_CACHE", 0},
|
||||
// { &key_memory_TABLE_sort_io_cache, "TABLE::sort_io_cache", 0},
|
||||
// { &key_memory_frm, "frm", 0},
|
||||
{ &key_memory_Unique_sort_buffer, "Unique::sort_buffer", 0},
|
||||
{ &key_memory_Unique_merge_buffer, "Unique::merge_buffer", 0},
|
||||
{ &key_memory_TABLE, "TABLE", PSI_FLAG_GLOBAL}, /* Table cache */
|
||||
// { &key_memory_frm_extra_segment_buff, "frm::extra_segment_buff", 0},
|
||||
// { &key_memory_frm_form_pos, "frm::form_pos", 0},
|
||||
{ &key_memory_frm_string, "frm::string", 0},
|
||||
// { &key_memory_LOG_name, "LOG_name", 0},
|
||||
{ &key_memory_DATE_TIME_FORMAT, "DATE_TIME_FORMAT", 0},
|
||||
{ &key_memory_DDL_LOG_MEMORY_ENTRY, "DDL_LOG_MEMORY_ENTRY", 0},
|
||||
{ &key_memory_ST_SCHEMA_TABLE, "ST_SCHEMA_TABLE", 0},
|
||||
@@ -9896,30 +9861,15 @@ static PSI_memory_info all_server_memory[]=
|
||||
{ &key_memory_PROFILE, "PROFILE", 0},
|
||||
{ &key_memory_global_system_variables, "global_system_variables", 0},
|
||||
{ &key_memory_THD_variables, "THD::variables", 0},
|
||||
// { &key_memory_Security_context, "Security_context", 0},
|
||||
// { &key_memory_shared_memory_name, "Shared_memory_name", 0},
|
||||
{ &key_memory_bison_stack, "bison_stack", 0},
|
||||
{ &key_memory_THD_handler_tables_hash, "THD::handler_tables_hash", 0},
|
||||
{ &key_memory_hash_index_key_buffer, "hash_index_key_buffer", 0},
|
||||
{ &key_memory_dboptions_hash, "dboptions_hash", 0},
|
||||
{ &key_memory_dbnames_cache, "dbnames_cache", 0},
|
||||
{ &key_memory_user_conn, "user_conn", 0},
|
||||
// { &key_memory_LOG_POS_COORD, "LOG_POS_COORD", 0},
|
||||
// { &key_memory_XID_STATE, "XID_STATE", 0},
|
||||
{ &key_memory_MPVIO_EXT_auth_info, "MPVIO_EXT::auth_info", 0},
|
||||
// { &key_memory_opt_bin_logname, "opt_bin_logname", 0},
|
||||
{ &key_memory_Query_cache, "Query_cache", PSI_FLAG_GLOBAL},
|
||||
// { &key_memory_READ_RECORD_cache, "READ_RECORD_cache", 0},
|
||||
// { &key_memory_Quick_ranges, "Quick_ranges", 0},
|
||||
// { &key_memory_File_query_log_name, "File_query_log::name", 0},
|
||||
{ &key_memory_Table_trigger_dispatcher, "Table_trigger_dispatcher::m_mem_root", 0},
|
||||
// { &key_memory_thd_timer, "thd_timer", 0},
|
||||
// { &key_memory_THD_Session_tracker, "THD::Session_tracker", 0},
|
||||
// { &key_memory_THD_Session_sysvar_resource_manager, "THD::Session_sysvar_resource_manager", 0},
|
||||
// { &key_memory_show_slave_status_io_gtid_set, "show_slave_status_io_gtid_set", 0},
|
||||
// { &key_memory_write_set_extraction, "write_set_extraction", 0},
|
||||
// { &key_memory_get_all_tables, "get_all_tables", 0},
|
||||
// { &key_memory_fill_schema_schemata, "fill_schema_schemata", 0},
|
||||
{ &key_memory_native_functions, "native_functions", PSI_FLAG_GLOBAL},
|
||||
{ &key_memory_WSREP, "wsrep", 0 }
|
||||
};
|
||||
|
Reference in New Issue
Block a user