diff --git a/plugin/connection_control/connection_control.cc b/plugin/connection_control/connection_control.cc index fe87f17cdb7..859b14244f3 100644 --- a/plugin/connection_control/connection_control.cc +++ b/plugin/connection_control/connection_control.cc @@ -57,7 +57,7 @@ using connection_control::Error_handler; using connection_control::Connection_control_error_handler; Connection_control_statistics g_statistics; -Connection_control_variables g_variables; +Connection_control_variables g_variables MY_GLOBAL; Connection_event_coordinator *g_connection_event_coordinator= 0; MYSQL_PLUGIN connection_control_plugin_info= 0; diff --git a/plugin/fulltext/example/plugin_example.c b/plugin/fulltext/example/plugin_example.c index d4e8edbedae..7a0803bfbf6 100644 --- a/plugin/fulltext/example/plugin_example.c +++ b/plugin/fulltext/example/plugin_example.c @@ -230,8 +230,8 @@ static struct st_mysql_show_var simple_status[]= Plugin system variables. */ -static long sysvar_one_value; -static char *sysvar_two_value; +static long sysvar_one_value MY_GLOBAL; +static char *sysvar_two_value MY_GLOBAL; static MYSQL_SYSVAR_LONG(simple_sysvar_one, sysvar_one_value, PLUGIN_VAR_RQCMDARG, diff --git a/plugin/fulltext/mecab_parser/plugin_mecab.cc b/plugin/fulltext/mecab_parser/plugin_mecab.cc index 7b2c7207bbe..2ae88c41a69 100644 --- a/plugin/fulltext/mecab_parser/plugin_mecab.cc +++ b/plugin/fulltext/mecab_parser/plugin_mecab.cc @@ -37,7 +37,7 @@ static MeCab::Tagger* mecab_tagger = NULL; static char mecab_charset[64]; /** Mecab rc file path. */ -static char* mecab_rc_file; +static char* mecab_rc_file MY_GLOBAL; static const char* mecab_min_supported_version = "0.993"; static const char* mecab_max_supported_version = "0.996"; diff --git a/plugin/fulltext/ngram_parser/plugin_ngram.cc b/plugin/fulltext/ngram_parser/plugin_ngram.cc index 258e6b55490..8aa306dc495 100644 --- a/plugin/fulltext/ngram_parser/plugin_ngram.cc +++ b/plugin/fulltext/ngram_parser/plugin_ngram.cc @@ -25,7 +25,7 @@ /* We are following InnoDB coding guidelines. */ /** Ngram token size, by default bigram. */ -static int ngram_token_size; +static int ngram_token_size MY_GLOBAL; #define RETURN_IF_ERROR(ret) if (ret != 0) return ret; diff --git a/plugin/innodb_memcached/daemon_memcached/daemon/memcached_mysql.cc b/plugin/innodb_memcached/daemon_memcached/daemon/memcached_mysql.cc index 7715e0dab85..ca8204a43da 100644 --- a/plugin/innodb_memcached/daemon_memcached/daemon/memcached_mysql.cc +++ b/plugin/innodb_memcached/daemon_memcached/daemon/memcached_mysql.cc @@ -47,12 +47,12 @@ struct mysql_memcached_context }; /** Variables for configure options */ -static char* mci_engine_library = NULL; -static char* mci_eng_lib_path = NULL; -static char* mci_memcached_option = NULL; -static unsigned int mci_r_batch_size = 1048576; -static unsigned int mci_w_batch_size = 32; -static my_bool mci_enable_binlog = false; +static char* mci_engine_library MY_GLOBAL = NULL; +static char* mci_eng_lib_path MY_GLOBAL = NULL; +static char* mci_memcached_option MY_GLOBAL = NULL; +static unsigned int mci_r_batch_size MY_GLOBAL = 1048576; +static unsigned int mci_w_batch_size MY_GLOBAL = 32; +static my_bool mci_enable_binlog MY_GLOBAL = false; static MYSQL_SYSVAR_STR(engine_lib_name, mci_engine_library, PLUGIN_VAR_READONLY | PLUGIN_VAR_MEMALLOC, diff --git a/plugin/keyring/common/keyring_impl.cc b/plugin/keyring/common/keyring_impl.cc index 47e91346cfd..63c389bf3ce 100644 --- a/plugin/keyring/common/keyring_impl.cc +++ b/plugin/keyring/common/keyring_impl.cc @@ -37,7 +37,7 @@ boost::movelib::unique_ptr keys(NULL); volatile my_bool is_keys_container_initialized= FALSE; boost::movelib::unique_ptr logger(NULL); boost::movelib::unique_ptr keyring_file_data(NULL); -my_bool keyring_open_mode= FALSE; // 0 - Read|Write|Create; 1 - Read only +my_bool keyring_open_mode MY_GLOBAL= FALSE; // 0 - Read|Write|Create; 1 - Read only #ifdef HAVE_PSI_INTERFACE static PSI_rwlock_info all_keyring_rwlocks[]= diff --git a/plugin/keyring/keyring.cc b/plugin/keyring/keyring.cc index f15297060e9..d59bf4bad3c 100644 --- a/plugin/keyring/keyring.cc +++ b/plugin/keyring/keyring.cc @@ -77,7 +77,7 @@ int check_keyring_file_data(MYSQL_THD thd MY_ATTRIBUTE((unused)), return(0); } -static char *keyring_file_data_value= NULL; +static char *keyring_file_data_value MY_GLOBAL= NULL; static MYSQL_SYSVAR_STR( data, /* name */ keyring_file_data_value, /* value */ diff --git a/plugin/password_validation/validate_password.cc b/plugin/password_validation/validate_password.cc index 420ca16c33f..005dd069904 100644 --- a/plugin/password_validation/validate_password.cc +++ b/plugin/password_validation/validate_password.cc @@ -89,15 +89,15 @@ typedef std::string string_type; typedef std::set set_type; static set_type dictionary_words; -static int validate_password_length; -static int validate_password_number_count; -static int validate_password_mixed_case_count; +static int validate_password_length MY_GLOBAL; +static int validate_password_number_count MY_GLOBAL; +static int validate_password_mixed_case_count MY_GLOBAL; static int validate_password_special_char_count; -static ulong validate_password_policy; -static char *validate_password_dictionary_file; +static ulong validate_password_policy MY_GLOBAL; +static char *validate_password_dictionary_file MY_GLOBAL; static char *validate_password_dictionary_file_last_parsed= NULL; static long long validate_password_dictionary_file_words_count= 0; -static my_bool check_user_name; +static my_bool check_user_name MY_GLOBAL; /** Activate the new dictionary diff --git a/plugin/rewriter/rewriter_plugin.cc b/plugin/rewriter/rewriter_plugin.cc index 89ab52fadcb..47ed0d19d55 100644 --- a/plugin/rewriter/rewriter_plugin.cc +++ b/plugin/rewriter/rewriter_plugin.cc @@ -103,10 +103,10 @@ static st_mysql_show_var rewriter_plugin_status_vars[]= /// Verbose level. -static int sys_var_verbose; +static int sys_var_verbose MY_GLOBAL; /// Enabled. -static my_bool sys_var_enabled; +static my_bool sys_var_enabled MY_GLOBAL; /// Updater function for the status variable ..._verbose. static void update_verbose(MYSQL_THD, struct st_mysql_sys_var *, void *, diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc index ac63dcbc37d..2ab78c21290 100644 --- a/plugin/semisync/semisync_master.cc +++ b/plugin/semisync/semisync_master.cc @@ -33,9 +33,9 @@ #define TIME_BILLION 1000000000 /* This indicates whether semi-synchronous replication is enabled. */ -char rpl_semi_sync_master_enabled; -unsigned long rpl_semi_sync_master_timeout; -unsigned long rpl_semi_sync_master_trace_level; +char rpl_semi_sync_master_enabled MY_GLOBAL; +unsigned long rpl_semi_sync_master_timeout MY_GLOBAL; +unsigned long rpl_semi_sync_master_trace_level MY_GLOBAL; char rpl_semi_sync_master_status = 0; unsigned long rpl_semi_sync_master_yes_transactions = 0; unsigned long rpl_semi_sync_master_no_transactions = 0; @@ -51,7 +51,7 @@ unsigned long long rpl_semi_sync_master_net_wait_num = 0; unsigned long rpl_semi_sync_master_clients = 0; unsigned long long rpl_semi_sync_master_net_wait_time = 0; unsigned long long rpl_semi_sync_master_trx_wait_time = 0; -char rpl_semi_sync_master_wait_no_slave = 1; +char rpl_semi_sync_master_wait_no_slave MY_GLOBAL = 1; unsigned int rpl_semi_sync_master_wait_for_slave_count= 1; diff --git a/plugin/semisync/semisync_master_plugin.cc b/plugin/semisync/semisync_master_plugin.cc index 186947413a1..1b8c919e715 100644 --- a/plugin/semisync/semisync_master_plugin.cc +++ b/plugin/semisync/semisync_master_plugin.cc @@ -35,7 +35,7 @@ enum enum_wait_point { WAIT_AFTER_COMMIT }; -static ulong rpl_semi_sync_master_wait_point= WAIT_AFTER_COMMIT; +static ulong rpl_semi_sync_master_wait_point MY_GLOBAL= WAIT_AFTER_COMMIT; static bool SEMI_SYNC_DUMP= true; diff --git a/plugin/semisync/semisync_slave.cc b/plugin/semisync/semisync_slave.cc index d45b9cb6e9e..beebbf98781 100644 --- a/plugin/semisync/semisync_slave.cc +++ b/plugin/semisync/semisync_slave.cc @@ -25,7 +25,7 @@ #include "mysql.h" #include "debug_sync.h" -char rpl_semi_sync_slave_enabled; +char rpl_semi_sync_slave_enabled MY_GLOBAL; char rpl_semi_sync_slave_status= 0; unsigned long rpl_semi_sync_slave_trace_level; diff --git a/plugin/test_service_sql_api/test_session_in_thd.cc b/plugin/test_service_sql_api/test_session_in_thd.cc index 6b4e4e1e5ff..62012d3b117 100644 --- a/plugin/test_service_sql_api/test_session_in_thd.cc +++ b/plugin/test_service_sql_api/test_session_in_thd.cc @@ -53,7 +53,7 @@ struct test_services_context /* SQL (system) variable to control number of sessions */ /* Only effective at start of mysqld by setting it as option --loose-... */ -int nb_sessions; +int nb_sessions MY_GLOBAL; static MYSQL_SYSVAR_INT (nb_sessions, nb_sessions, PLUGIN_VAR_RQCMDARG, "number of sessions", NULL, NULL, 1, 1, 500, 0); diff --git a/plugin/test_service_sql_api/test_sql_errors.cc b/plugin/test_service_sql_api/test_sql_errors.cc index baa2d8a8871..886a74cc493 100644 --- a/plugin/test_service_sql_api/test_sql_errors.cc +++ b/plugin/test_service_sql_api/test_sql_errors.cc @@ -706,7 +706,7 @@ static void exec_test_cmd(MYSQL_SESSION session, const char *test_cmd, void *p, /* SQL (system) variable to control number of sessions */ /* Only effective at start od mysqld by setting it as option --loose-... */ -int nb_sessions; +int nb_sessions MY_GLOBAL; static MYSQL_SYSVAR_INT (nb_sessions, nb_sessions, PLUGIN_VAR_RQCMDARG, "number of sessions", NULL, NULL, 1, 1, 500, 0); diff --git a/plugin/test_services/test_services.cc b/plugin/test_services/test_services.cc index dc93da8ff77..2fdc3f8bf3a 100644 --- a/plugin/test_services/test_services.cc +++ b/plugin/test_services/test_services.cc @@ -47,15 +47,15 @@ static struct st_mysql_show_var test_services_status[]= /* SQL (system) variables to control test execution */ /* SQL (system) variables to switch on/off test of services, default=on */ /* Only be effective at start od mysqld by setting it as option --loose-... */ -static int with_snprintf_val= 0; +static int with_snprintf_val MY_GLOBAL= 0; static MYSQL_SYSVAR_INT (with_snprintf, with_snprintf_val , PLUGIN_VAR_RQCMDARG, "Switch on/off test of snprintf service", NULL, NULL, 1, 0, 1, 0); -static int with_log_message_val= 0; +static int with_log_message_val MY_GLOBAL= 0; static MYSQL_SYSVAR_INT (with_log_message, with_log_message_val, PLUGIN_VAR_RQCMDARG, "Switch on/off test of log message service", NULL, NULL, 1, 0, 1, 0); -static int non_default_variable_value= 0; +static int non_default_variable_value MY_GLOBAL= 0; static MYSQL_SYSVAR_INT(non_default_variable, non_default_variable_value, PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_NODEFAULT, "A variable that won't accept SET DEFAULT", NULL, NULL, diff --git a/plugin/test_services/test_services_threaded.cc b/plugin/test_services/test_services_threaded.cc index 12062d072c3..5f37d864298 100644 --- a/plugin/test_services/test_services_threaded.cc +++ b/plugin/test_services/test_services_threaded.cc @@ -52,11 +52,11 @@ static struct st_mysql_show_var test_services_status[]= /* SQL variables to control test execution */ /* SQL variables to switch on/off test of services, default=on */ /* Only be effective at start od mysqld by setting it as option --loose-... */ -static int with_snprintf_val= 0; +static int with_snprintf_val MY_GLOBAL= 0; static MYSQL_SYSVAR_INT (with_snprintf, with_snprintf_val , PLUGIN_VAR_RQCMDARG, "Switch on/off test of snprintf service", NULL, NULL, 1, 0, 1, 0); -static int with_log_message_val= 0; +static int with_log_message_val MY_GLOBAL= 0; static MYSQL_SYSVAR_INT (with_log_message, with_log_message_val, PLUGIN_VAR_RQCMDARG, "Switch on/off test of log message service", NULL, NULL, 1, 0, 1, 0); diff --git a/rapid/plugin/group_replication/src/plugin.cc b/rapid/plugin/group_replication/src/plugin.cc index d38794a5ca2..77df3e5e8dc 100644 --- a/rapid/plugin/group_replication/src/plugin.cc +++ b/rapid/plugin/group_replication/src/plugin.cc @@ -69,14 +69,14 @@ Group_partition_handling *group_partition_handler= NULL; Blocked_transaction_handler *blocked_transaction_handler= NULL; /* Group communication options */ -char *local_address_var= NULL; -char *group_seeds_var= NULL; -char *force_members_var= NULL; +char *local_address_var MY_GLOBAL= NULL; +char *group_seeds_var MY_GLOBAL= NULL; +char *force_members_var MY_GLOBAL= NULL; bool force_members_running= false; static mysql_mutex_t force_members_running_mutex; -my_bool bootstrap_group_var= false; -ulong poll_spin_loops_var= 0; -ulong ssl_mode_var= 0; +my_bool bootstrap_group_var MY_GLOBAL= false; +ulong poll_spin_loops_var MY_GLOBAL= 0; +ulong ssl_mode_var MY_GLOBAL= 0; const char* ssl_mode_values[]= { "DISABLED", @@ -100,7 +100,7 @@ static TYPELIB plugin_bool_typelib= { }; #define IP_WHITELIST_STR_BUFFER_LENGTH 1024 -char *ip_whitelist_var= NULL; +char *ip_whitelist_var MY_GLOBAL= NULL; const char *IP_WHITELIST_DEFAULT= "AUTOMATIC"; //The plugin auto increment handler @@ -117,11 +117,11 @@ Compatibility_module* compatibility_mgr= NULL; /* Plugin group related options */ const char *group_replication_plugin_name= "group_replication"; -char *group_name_var= NULL; -my_bool start_group_replication_at_boot_var= true; +char *group_name_var MY_GLOBAL= NULL; +my_bool start_group_replication_at_boot_var MY_GLOBAL= true; rpl_sidno group_sidno; -my_bool single_primary_mode_var= FALSE; -my_bool enforce_update_everywhere_checks_var= TRUE; +my_bool single_primary_mode_var MY_GLOBAL= FALSE; +my_bool enforce_update_everywhere_checks_var MY_GLOBAL= TRUE; /* Applier module related */ bool known_server_reset; @@ -140,19 +140,19 @@ static const int RECOVERY_SSL_CRLPATH_OPT= 7; std::map recovery_ssl_opt_map; // SSL options -my_bool recovery_use_ssl_var= false; -char* recovery_ssl_ca_var= NULL; -char* recovery_ssl_capath_var= NULL; -char* recovery_ssl_cert_var= NULL; -char* recovery_ssl_cipher_var= NULL; -char* recovery_ssl_key_var= NULL; -char* recovery_ssl_crl_var= NULL; +my_bool recovery_use_ssl_var MY_GLOBAL= false; +char* recovery_ssl_ca_var MY_GLOBAL= NULL; +char* recovery_ssl_capath_var MY_GLOBAL= NULL; +char* recovery_ssl_cert_var MY_GLOBAL= NULL; +char* recovery_ssl_cipher_var MY_GLOBAL= NULL; +char* recovery_ssl_key_var MY_GLOBAL= NULL; +char* recovery_ssl_crl_var MY_GLOBAL= NULL; char* recovery_ssl_crlpath_var= NULL; -my_bool recovery_ssl_verify_server_cert_var= false; -ulong recovery_completion_policy_var; +my_bool recovery_ssl_verify_server_cert_var MY_GLOBAL= false; +ulong recovery_completion_policy_var MY_GLOBAL; -ulong recovery_retry_count_var= 0; -ulong recovery_reconnect_interval_var= 0; +ulong recovery_retry_count_var MY_GLOBAL= 0; +ulong recovery_reconnect_interval_var MY_GLOBAL= 0; /* Write set extraction algorithm*/ int write_set_extraction_algorithm= HASH_ALGORITHM_OFF; @@ -161,10 +161,10 @@ int write_set_extraction_algorithm= HASH_ALGORITHM_OFF; uint gr_lower_case_table_names= 0; /* Generic components variables */ -ulong components_stop_timeout_var= LONG_TIMEOUT; +ulong components_stop_timeout_var MY_GLOBAL= LONG_TIMEOUT; /* The timeout before going to error when majority becomes unreachable */ -ulong timeout_on_unreachable_var= 0; +ulong timeout_on_unreachable_var MY_GLOBAL= 0; /* Exit state action that is executed when a server involuntarily leaves the @@ -180,45 +180,45 @@ ulong exit_state_action_var; #define DEFAULT_AUTO_INCREMENT_INCREMENT 7 #define MIN_AUTO_INCREMENT_INCREMENT 1 #define MAX_AUTO_INCREMENT_INCREMENT 65535 -ulong auto_increment_increment_var= DEFAULT_AUTO_INCREMENT_INCREMENT; +ulong auto_increment_increment_var MY_GLOBAL= DEFAULT_AUTO_INCREMENT_INCREMENT; /* compression options */ #define DEFAULT_COMPRESSION_THRESHOLD 1000000 #define MAX_COMPRESSION_THRESHOLD UINT_MAX32 #define MIN_COMPRESSION_THRESHOLD 0 -ulong compression_threshold_var= DEFAULT_COMPRESSION_THRESHOLD; +ulong compression_threshold_var MY_GLOBAL= DEFAULT_COMPRESSION_THRESHOLD; /* GTID assignment block size options */ #define DEFAULT_GTID_ASSIGNMENT_BLOCK_SIZE 1000000 #define MIN_GTID_ASSIGNMENT_BLOCK_SIZE 1 #define MAX_GTID_ASSIGNMENT_BLOCK_SIZE MAX_GNO -ulonglong gtid_assignment_block_size_var= DEFAULT_GTID_ASSIGNMENT_BLOCK_SIZE; +ulonglong gtid_assignment_block_size_var MY_GLOBAL= DEFAULT_GTID_ASSIGNMENT_BLOCK_SIZE; /* Flow control options */ -ulong flow_control_mode_var= FCM_QUOTA; +ulong flow_control_mode_var MY_GLOBAL= FCM_QUOTA; #define DEFAULT_FLOW_CONTROL_THRESHOLD 25000 #define MAX_FLOW_CONTROL_THRESHOLD INT_MAX32 #define MIN_FLOW_CONTROL_THRESHOLD 0 int flow_control_certifier_threshold_var= DEFAULT_FLOW_CONTROL_THRESHOLD; -int flow_control_applier_threshold_var= DEFAULT_FLOW_CONTROL_THRESHOLD; +int flow_control_applier_threshold_var MY_GLOBAL= DEFAULT_FLOW_CONTROL_THRESHOLD; /* Transaction size limits */ #define DEFAULT_TRANSACTION_SIZE_LIMIT 0 #define MAX_TRANSACTION_SIZE_LIMIT 2147483647 #define MIN_TRANSACTION_SIZE_LIMIT 0 -ulong transaction_size_limit_var= DEFAULT_TRANSACTION_SIZE_LIMIT; +ulong transaction_size_limit_var MY_GLOBAL= DEFAULT_TRANSACTION_SIZE_LIMIT; /* Member Weight limits */ #define DEFAULT_MEMBER_WEIGHT 50 #define MAX_MEMBER_WEIGHT 100 #define MIN_MEMBER_WEIGHT 0 -uint member_weight_var= DEFAULT_MEMBER_WEIGHT; +uint member_weight_var MY_GLOBAL= DEFAULT_MEMBER_WEIGHT; /* Downgrade options */ -char allow_local_lower_version_join_var= 0; +char allow_local_lower_version_join_var MY_GLOBAL= 0; /* Allow errand transactions */ -char allow_local_disjoint_gtids_join_var= 0; +char allow_local_disjoint_gtids_join_var MY_GLOBAL= 0; /* Certification latch */ Wait_ticket *certification_latch; diff --git a/rapid/plugin/x/src/xpl_system_variables.cc b/rapid/plugin/x/src/xpl_system_variables.cc index c759d836775..17fc1498105 100644 --- a/rapid/plugin/x/src/xpl_system_variables.cc +++ b/rapid/plugin/x/src/xpl_system_variables.cc @@ -28,17 +28,17 @@ namespace xpl { -int Plugin_system_variables::max_connections; -unsigned int Plugin_system_variables::port; -unsigned int Plugin_system_variables::min_worker_threads; -unsigned int Plugin_system_variables::idle_worker_thread_timeout; -unsigned int Plugin_system_variables::max_allowed_packet; -unsigned int Plugin_system_variables::connect_timeout; -char *Plugin_system_variables::socket; +int Plugin_system_variables::max_connections MY_GLOBAL; +unsigned int Plugin_system_variables::port MY_GLOBAL; +unsigned int Plugin_system_variables::min_worker_threads MY_GLOBAL; +unsigned int Plugin_system_variables::idle_worker_thread_timeout MY_GLOBAL; +unsigned int Plugin_system_variables::max_allowed_packet MY_GLOBAL; +unsigned int Plugin_system_variables::connect_timeout MY_GLOBAL; +char *Plugin_system_variables::socket MY_GLOBAL; unsigned int Plugin_system_variables::port_open_timeout; -char *Plugin_system_variables::bind_address; +char *Plugin_system_variables::bind_address MY_GLOBAL; -Ssl_config Plugin_system_variables::ssl_config; +Ssl_config Plugin_system_variables::ssl_config MY_GLOBAL; std::vector Plugin_system_variables::m_callbacks; diff --git a/sql/auth/sql_authentication.cc b/sql/auth/sql_authentication.cc index 395850b7bd7..c4754dbfa2f 100644 --- a/sql/auth/sql_authentication.cc +++ b/sql/auth/sql_authentication.cc @@ -99,9 +99,9 @@ my_bool disconnect_on_expired_password= TRUE; my_bool opt_auto_generate_certs= TRUE; -char *auth_rsa_private_key_path; -char *auth_rsa_public_key_path; -my_bool auth_rsa_auto_generate_rsa_keys= TRUE; +char *auth_rsa_private_key_path MY_GLOBAL; +char *auth_rsa_public_key_path MY_GLOBAL; +my_bool auth_rsa_auto_generate_rsa_keys MY_GLOBAL= TRUE; static bool do_auto_rsa_keys_generation(); static Rsa_authentication_keys g_rsa_keys; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 2618afa666b..c9aa8b2ed9c 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -81,16 +81,16 @@ static const int DEFAULT_PARALLELISM= 0; static const ha_rows DEFAULT_AUTO_PREFETCH= 32; static const ulong ONE_YEAR_IN_SECONDS= (ulong) 3600L*24L*365L; -ulong opt_ndb_extra_logging; -static ulong opt_ndb_wait_connected; -ulong opt_ndb_wait_setup; -static ulong opt_ndb_cache_check_time; -static uint opt_ndb_cluster_connection_pool; -static uint opt_ndb_recv_thread_activation_threshold; -static char* opt_ndb_recv_thread_cpu_mask; -static char* opt_ndb_index_stat_option; -static char* opt_ndb_connectstring; -static uint opt_ndb_nodeid; +ulong opt_ndb_extra_logging MY_GLOBAL; +static ulong opt_ndb_wait_connected MY_GLOBAL; +ulong opt_ndb_wait_setup MY_GLOBAL; +static ulong opt_ndb_cache_check_time MY_GLOBAL; +static uint opt_ndb_cluster_connection_pool MY_GLOBAL; +static uint opt_ndb_recv_thread_activation_threshold MY_GLOBAL; +static char* opt_ndb_recv_thread_cpu_mask MY_GLOBAL; +static char* opt_ndb_index_stat_option MY_GLOBAL; +static char* opt_ndb_connectstring MY_GLOBAL; +static uint opt_ndb_nodeid MY_GLOBAL; static MYSQL_THDVAR_UINT( autoincrement_prefetch_sz, /* name */ @@ -854,7 +854,7 @@ int ndb_to_mysql_error(const NdbError *ndberr) return error; } -ulong opt_ndb_slave_conflict_role; +ulong opt_ndb_slave_conflict_role MY_GLOBAL; #ifdef HAVE_NDB_BINLOG @@ -13121,7 +13121,7 @@ static int ndbcluster_make_pushed_join(handlerton *, THD*, const AQP::Join_plan*); /* Version in composite numerical format */ -static Uint32 ndb_version = NDB_VERSION_D; +static Uint32 ndb_version MY_GLOBAL = NDB_VERSION_D; static MYSQL_SYSVAR_UINT( version, /* name */ ndb_version, /* var */ @@ -13136,7 +13136,7 @@ static MYSQL_SYSVAR_UINT( ); /* Version in ndb-Y.Y.Y[-status] format */ -static char* ndb_version_string = (char*)NDB_NDB_VERSION_STRING; +static char* ndb_version_string MY_GLOBAL = (char*)NDB_NDB_VERSION_STRING; static MYSQL_SYSVAR_STR( version_string, /* name */ ndb_version_string, /* var */ @@ -16795,7 +16795,7 @@ enum ndb_distribution_enum { NDB_DISTRIBUTION_LINHASH= 1 }; static const char* distribution_names[]= { "KEYHASH", "LINHASH", NullS }; -static ulong opt_ndb_distribution; +static ulong opt_ndb_distribution MY_GLOBAL; static TYPELIB distribution_typelib= { array_elements(distribution_names) - 1, "", @@ -18986,7 +18986,7 @@ static MYSQL_SYSVAR_STR( ); -ulong opt_ndb_report_thresh_binlog_epoch_slip; +ulong opt_ndb_report_thresh_binlog_epoch_slip MY_GLOBAL; static MYSQL_SYSVAR_ULONG( report_thresh_binlog_epoch_slip, /* name */ opt_ndb_report_thresh_binlog_epoch_slip,/* var */ @@ -19005,7 +19005,7 @@ static MYSQL_SYSVAR_ULONG( ); -ulong opt_ndb_report_thresh_binlog_mem_usage; +ulong opt_ndb_report_thresh_binlog_mem_usage MY_GLOBAL; static MYSQL_SYSVAR_ULONG( report_thresh_binlog_mem_usage, /* name */ opt_ndb_report_thresh_binlog_mem_usage,/* var */ @@ -19023,7 +19023,7 @@ static MYSQL_SYSVAR_ULONG( ); -ulong opt_ndb_eventbuffer_max_alloc; +ulong opt_ndb_eventbuffer_max_alloc MY_GLOBAL; static MYSQL_SYSVAR_ULONG( eventbuffer_max_alloc, /* name */ opt_ndb_eventbuffer_max_alloc, /* var */ @@ -19039,7 +19039,7 @@ static MYSQL_SYSVAR_ULONG( ); -uint opt_ndb_eventbuffer_free_percent; +uint opt_ndb_eventbuffer_free_percent MY_GLOBAL; static MYSQL_SYSVAR_UINT( eventbuffer_free_percent, /* name */ opt_ndb_eventbuffer_free_percent,/* var */ @@ -19056,7 +19056,7 @@ static MYSQL_SYSVAR_UINT( ); -my_bool opt_ndb_log_update_as_write; +my_bool opt_ndb_log_update_as_write MY_GLOBAL; static MYSQL_SYSVAR_BOOL( log_update_as_write, /* name */ opt_ndb_log_update_as_write, /* var */ @@ -19069,7 +19069,7 @@ static MYSQL_SYSVAR_BOOL( 1 /* default */ ); -my_bool opt_ndb_log_update_minimal; +my_bool opt_ndb_log_update_minimal MY_GLOBAL; static MYSQL_SYSVAR_BOOL( log_update_minimal, /* name */ opt_ndb_log_update_minimal, /* var */ @@ -19084,7 +19084,7 @@ static MYSQL_SYSVAR_BOOL( 0 /* default */ ); -my_bool opt_ndb_log_updated_only; +my_bool opt_ndb_log_updated_only MY_GLOBAL; static MYSQL_SYSVAR_BOOL( log_updated_only, /* name */ opt_ndb_log_updated_only, /* var */ @@ -19098,7 +19098,7 @@ static MYSQL_SYSVAR_BOOL( 1 /* default */ ); -my_bool opt_ndb_log_empty_update; +my_bool opt_ndb_log_empty_update MY_GLOBAL; static MYSQL_SYSVAR_BOOL( log_empty_update, /* name */ opt_ndb_log_empty_update, /* var */ @@ -19114,7 +19114,7 @@ static MYSQL_SYSVAR_BOOL( 0 /* default */ ); -my_bool opt_ndb_log_orig; +my_bool opt_ndb_log_orig MY_GLOBAL; static MYSQL_SYSVAR_BOOL( log_orig, /* name */ opt_ndb_log_orig, /* var */ @@ -19128,7 +19128,7 @@ static MYSQL_SYSVAR_BOOL( ); -my_bool opt_ndb_log_bin; +my_bool opt_ndb_log_bin MY_GLOBAL; static MYSQL_SYSVAR_BOOL( log_bin, /* name */ opt_ndb_log_bin, /* var */ @@ -19141,7 +19141,7 @@ static MYSQL_SYSVAR_BOOL( ); -my_bool opt_ndb_log_binlog_index; +my_bool opt_ndb_log_binlog_index MY_GLOBAL; static MYSQL_SYSVAR_BOOL( log_binlog_index, /* name */ opt_ndb_log_binlog_index, /* var */ @@ -19154,7 +19154,7 @@ static MYSQL_SYSVAR_BOOL( ); -static my_bool opt_ndb_log_empty_epochs; +static my_bool opt_ndb_log_empty_epochs MY_GLOBAL; static MYSQL_SYSVAR_BOOL( log_empty_epochs, /* name */ opt_ndb_log_empty_epochs, /* var */ @@ -19170,7 +19170,7 @@ bool ndb_log_empty_epochs(void) return opt_ndb_log_empty_epochs; } -my_bool opt_ndb_log_apply_status; +my_bool opt_ndb_log_apply_status MY_GLOBAL; static MYSQL_SYSVAR_BOOL( log_apply_status, /* name */ opt_ndb_log_apply_status, /* var */ @@ -19182,7 +19182,7 @@ static MYSQL_SYSVAR_BOOL( ); -my_bool opt_ndb_log_transaction_id; +my_bool opt_ndb_log_transaction_id MY_GLOBAL; static MYSQL_SYSVAR_BOOL( log_transaction_id, /* name */ opt_ndb_log_transaction_id, /* var */ diff --git a/sql/ha_ndbinfo.cc b/sql/ha_ndbinfo.cc index 3d92f6ed919..694fa17d3da 100644 --- a/sql/ha_ndbinfo.cc +++ b/sql/ha_ndbinfo.cc @@ -72,7 +72,7 @@ static MYSQL_SYSVAR_STR( NULL /* default */ ); -static char* opt_ndbinfo_table_prefix = (char*)"ndb$"; +static char* opt_ndbinfo_table_prefix MY_GLOBAL = (char*)"ndb$"; static MYSQL_SYSVAR_STR( table_prefix, /* name */ opt_ndbinfo_table_prefix, /* var */ @@ -83,7 +83,7 @@ static MYSQL_SYSVAR_STR( NULL /* default */ ); -static Uint32 opt_ndbinfo_version = NDB_VERSION_D; +static Uint32 opt_ndbinfo_version MY_GLOBAL = NDB_VERSION_D; static MYSQL_SYSVAR_UINT( version, /* name */ opt_ndbinfo_version, /* var */ @@ -97,7 +97,7 @@ static MYSQL_SYSVAR_UINT( 0 /* block */ ); -static my_bool opt_ndbinfo_offline; +static my_bool opt_ndbinfo_offline MY_GLOBAL; static void diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 4b18dca226f..310ee0c7a1f 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -407,7 +407,7 @@ my_bool opt_log_slow_slave_statements= 0; my_bool lower_case_file_system= 0; my_bool opt_large_pages= 0; my_bool opt_super_large_pages= 0; -my_bool opt_myisam_use_mmap= 0; +my_bool opt_myisam_use_mmap MY_GLOBAL= 0; my_bool offline_mode= 0; my_bool opt_log_builtin_as_identified_by_password= 0; uint opt_large_page_size= 0; diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index 30c0532129f..97cfb51abab 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -896,9 +896,9 @@ int ha_example::create(const char *name, TABLE *table_arg, struct st_mysql_storage_engine example_storage_engine= { MYSQL_HANDLERTON_INTERFACE_VERSION }; -static ulong srv_enum_var= 0; -static ulong srv_ulong_var= 0; -static double srv_double_var= 0; +static ulong srv_enum_var MY_GLOBAL= 0; +static ulong srv_ulong_var MY_GLOBAL= 0; +static double srv_double_var MY_GLOBAL= 0; const char *enum_var_names[]= { diff --git a/storage/innobase/api/api0api.cc b/storage/innobase/api/api0api.cc index 2bc190bb5ce..fe5fe548f14 100644 --- a/storage/innobase/api/api0api.cc +++ b/storage/innobase/api/api0api.cc @@ -55,19 +55,19 @@ InnoDB Native API #include "row0trunc.h" /** configure variable for binlog option with InnoDB APIs */ -my_bool ib_binlog_enabled = FALSE; +my_bool ib_binlog_enabled MY_GLOBAL = FALSE; /** configure variable for MDL option with InnoDB APIs */ -my_bool ib_mdl_enabled = FALSE; +my_bool ib_mdl_enabled MY_GLOBAL = FALSE; /** configure variable for disable rowlock with InnoDB APIs */ -my_bool ib_disable_row_lock = FALSE; +my_bool ib_disable_row_lock MY_GLOBAL = FALSE; /** configure variable for Transaction isolation levels */ -ulong ib_trx_level_setting = IB_TRX_READ_UNCOMMITTED; +ulong ib_trx_level_setting MY_GLOBAL = IB_TRX_READ_UNCOMMITTED; /** configure variable for background commit interval in seconds */ -ulong ib_bk_commit_interval = 0; +ulong ib_bk_commit_interval MY_GLOBAL = 0; /** InnoDB tuple types. */ enum ib_tuple_type_t{ diff --git a/storage/innobase/btr/btr0bulk.cc b/storage/innobase/btr/btr0bulk.cc index 7933116fb4a..d3a5bbaa3cb 100644 --- a/storage/innobase/btr/btr0bulk.cc +++ b/storage/innobase/btr/btr0bulk.cc @@ -38,7 +38,7 @@ Created 03/11/2014 Shaohua Wang #include "ibuf0ibuf.h" /** Innodb B-tree index fill factor for bulk load. */ -long innobase_fill_factor; +long innobase_fill_factor MY_GLOBAL; /** Initialize members, allocate page if needed and start mtr. Note: we commit all mtrs on failure. diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 1ddefdc82c7..14c298ab1a9 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -81,7 +81,7 @@ Created 11/5/1995 Heikki Tuuri #include #include -my_bool srv_numa_interleave = FALSE; +my_bool srv_numa_interleave MY_GLOBAL = FALSE; #ifdef HAVE_LIBNUMA #include @@ -358,7 +358,7 @@ static buf_pool_chunk_map_t* buf_chunk_map_ref = NULL; #ifdef UNIV_DEBUG /** Disable resizing buffer pool to make assertion code not expensive. */ -my_bool buf_disable_resize_buffer_pool_debug = TRUE; +my_bool buf_disable_resize_buffer_pool_debug MY_GLOBAL = TRUE; #endif /* UNIV_DEBUG */ #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG diff --git a/storage/innobase/buf/buf0checksum.cc b/storage/innobase/buf/buf0checksum.cc index 0d587bfbd13..ec0e3b10849 100644 --- a/storage/innobase/buf/buf0checksum.cc +++ b/storage/innobase/buf/buf0checksum.cc @@ -46,7 +46,7 @@ Created Aug 11, 2011 Vasil Dimov use srv_checksum_algorithm_t here then we get a compiler error: ha_innodb.cc:12251: error: cannot convert 'srv_checksum_algorithm_t*' to 'long unsigned int*' in initialization */ -ulong srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_INNODB; +ulong srv_checksum_algorithm MY_GLOBAL = SRV_CHECKSUM_ALGORITHM_INNODB; /** set if we have found pages matching legacy big endian checksum */ bool legacy_big_endian_checksum = false; diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index ed3f3f3a5cb..2065ff958e9 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -198,7 +198,7 @@ struct page_cleaner_t { static page_cleaner_t* page_cleaner = NULL; #ifdef UNIV_DEBUG -my_bool innodb_page_cleaner_disabled_debug; +my_bool innodb_page_cleaner_disabled_debug MY_GLOBAL; #endif /* UNIV_DEBUG */ /** If LRU list of a buf_pool is less than this size then LRU eviction diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc index d3f0af404c0..2ff57f35125 100644 --- a/storage/innobase/buf/buf0lru.cc +++ b/storage/innobase/buf/buf0lru.cc @@ -132,7 +132,7 @@ buf_LRU_stat_t buf_LRU_stat_sum; /** @name Heuristics for detecting index scan @{ */ /** Move blocks to "new" LRU list only if the first access was at least this many milliseconds ago. Not protected by any mutex or latch. */ -uint buf_LRU_old_threshold_ms; +uint buf_LRU_old_threshold_ms MY_GLOBAL; /* @} */ /******************************************************************//** diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index 2541c175401..3dcd43b69a3 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -115,7 +115,7 @@ ulong zip_failure_threshold_pct = 5; /** Maximum percentage of a page that can be allowed as a pad to avoid compression failures */ -ulong zip_pad_max = 50; +ulong zip_pad_max MY_GLOBAL = 50; #define DICT_HEAP_SIZE 100 /*!< initial memory heap size when creating a table or index object */ diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc index 0efcb26ad41..2dcc04b1301 100644 --- a/storage/innobase/dict/dict0load.cc +++ b/storage/innobase/dict/dict0load.cc @@ -114,7 +114,7 @@ dict_load_table_low( /* If this flag is TRUE, then we will load the cluster index's (and tables') metadata even if it is marked as "corrupted". */ -my_bool srv_load_corrupted = FALSE; +my_bool srv_load_corrupted MY_GLOBAL = FALSE; #ifdef UNIV_DEBUG /****************************************************************//** diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc index 8f6f045f1b8..5f5ab2e00c6 100644 --- a/storage/innobase/dict/dict0stats_bg.cc +++ b/storage/innobase/dict/dict0stats_bg.cc @@ -55,7 +55,7 @@ os_event_t dict_stats_event = NULL; #ifdef UNIV_DEBUG /** Used by SET GLOBAL innodb_dict_stats_disabled_debug = 1; */ -my_bool innodb_dict_stats_disabled_debug; +my_bool innodb_dict_stats_disabled_debug MY_GLOBAL; static os_event_t dict_stats_disabled_event; #endif /* UNIV_DEBUG */ diff --git a/storage/innobase/fsp/fsp0sysspace.cc b/storage/innobase/fsp/fsp0sysspace.cc index 9511f2a39b7..62105c9fa39 100644 --- a/storage/innobase/fsp/fsp0sysspace.cc +++ b/storage/innobase/fsp/fsp0sysspace.cc @@ -60,7 +60,7 @@ SysTablespace srv_tmp_space; /** If the last data file is auto-extended, we add this many pages to it at a time. We have to make this public because it is a config variable. */ -ulong sys_tablespace_auto_extend_increment; +ulong sys_tablespace_auto_extend_increment MY_GLOBAL; #ifdef UNIV_DEBUG /** Control if extra debug checks need to be done for temporary tablespace. diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index 1ed770d51f7..bdc217ebc8c 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -63,24 +63,24 @@ by looking up the key word in the obsolete table names */ /** This is maximum FTS cache for each table and would be a configurable variable */ -ulong fts_max_cache_size; +ulong fts_max_cache_size MY_GLOBAL; /** Whether the total memory used for FTS cache is exhausted, and we will need a sync to free some memory */ bool fts_need_sync = false; /** Variable specifying the total memory allocated for FTS cache */ -ulong fts_max_total_cache_size; +ulong fts_max_total_cache_size MY_GLOBAL; /** This is FTS result cache limit for each query and would be a configurable variable */ -ulong fts_result_cache_limit; +ulong fts_result_cache_limit MY_GLOBAL; /** Variable specifying the maximum FTS max token size */ ulong fts_max_token_size; /** Variable specifying the minimum FTS max token size */ -ulong fts_min_token_size; +ulong fts_min_token_size MY_GLOBAL; // FIXME: testing @@ -101,7 +101,7 @@ static const ulint FTS_DEADLOCK_RETRY_WAIT = 100000; /** variable to record innodb_fts_internal_tbl_name for information schema table INNODB_FTS_INSERTED etc. */ char* fts_internal_tbl_name = NULL; -char* fts_internal_tbl_name2 = NULL; +char* fts_internal_tbl_name2 MY_GLOBAL = NULL; /** InnoDB default stopword list: There are different versions of stopwords, the stop words listed diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc index d407e1e1312..05ef54fa869 100644 --- a/storage/innobase/fts/fts0opt.cc +++ b/storage/innobase/fts/fts0opt.cc @@ -232,10 +232,10 @@ struct fts_msg_t { }; /** The number of words to read and optimize in a single pass. */ -ulong fts_num_word_optimize; +ulong fts_num_word_optimize MY_GLOBAL; /** Whether to enable additional FTS diagnostic printout. */ -char fts_enable_diag_print; +char fts_enable_diag_print MY_GLOBAL; /** ZLib compressed block size.*/ static ulint FTS_ZIP_BLOCK_SIZE = 1024; diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 47d43cf1c4f..b65ed1bea28 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -144,63 +144,63 @@ static const long AUTOINC_OLD_STYLE_LOCKING = 0; static const long AUTOINC_NEW_STYLE_LOCKING = 1; static const long AUTOINC_NO_LOCKING = 2; -static long innobase_log_buffer_size; -static long innobase_open_files; -static long innobase_autoinc_lock_mode; -static ulong innobase_commit_concurrency = 0; -static ulong innobase_read_io_threads; -static ulong innobase_write_io_threads; +static long innobase_log_buffer_size MY_GLOBAL; +static long innobase_open_files MY_GLOBAL; +static long innobase_autoinc_lock_mode MY_GLOBAL; +static ulong innobase_commit_concurrency MY_GLOBAL = 0; +static ulong innobase_read_io_threads MY_GLOBAL; +static ulong innobase_write_io_threads MY_GLOBAL; -static long long innobase_buffer_pool_size, innobase_log_file_size; +static long long innobase_buffer_pool_size MY_GLOBAL, innobase_log_file_size MY_GLOBAL; /** Percentage of the buffer pool to reserve for 'old' blocks. Connected to buf_LRU_old_ratio. */ -static uint innobase_old_blocks_pct; +static uint innobase_old_blocks_pct MY_GLOBAL; /* The default values for the following char* start-up parameters are determined in innobase_init below: */ -static char* innobase_data_home_dir = NULL; -static char* innobase_data_file_path = NULL; -static char* innobase_temp_data_file_path = NULL; -static char* innobase_file_format_name = NULL; -static char* innobase_change_buffering = NULL; -static char* innobase_enable_monitor_counter = NULL; -static char* innobase_disable_monitor_counter = NULL; -static char* innobase_reset_monitor_counter = NULL; -static char* innobase_reset_all_monitor_counter = NULL; +static char* innobase_data_home_dir MY_GLOBAL = NULL; +static char* innobase_data_file_path MY_GLOBAL = NULL; +static char* innobase_temp_data_file_path MY_GLOBAL = NULL; +static char* innobase_file_format_name MY_GLOBAL = NULL; +static char* innobase_change_buffering MY_GLOBAL = NULL; +static char* innobase_enable_monitor_counter MY_GLOBAL = NULL; +static char* innobase_disable_monitor_counter MY_GLOBAL = NULL; +static char* innobase_reset_monitor_counter MY_GLOBAL = NULL; +static char* innobase_reset_all_monitor_counter MY_GLOBAL = NULL; /* The highest file format being used in the database. The value can be set by user, however, it will be adjusted to the newer file format if a table of such format is created/opened. */ -char* innobase_file_format_max = NULL; +char* innobase_file_format_max MY_GLOBAL = NULL; /** Default value of innodb_file_format */ static const char* innodb_file_format_default = "Barracuda"; /** Default value of innodb_file_format_max */ static const char* innodb_file_format_max_default = "Antelope"; -static char* innobase_file_flush_method = NULL; +static char* innobase_file_flush_method MY_GLOBAL = NULL; /* This variable can be set in the server configure file, specifying stopword table to be used */ -static char* innobase_server_stopword_table = NULL; +static char* innobase_server_stopword_table MY_GLOBAL = NULL; /* Below we have boolean-valued start-up parameters, and their default values */ -static ulong innobase_fast_shutdown = 1; -static my_bool innobase_file_format_check = TRUE; -static my_bool innobase_use_doublewrite = TRUE; -static my_bool innobase_use_checksums = TRUE; -static my_bool innobase_locks_unsafe_for_binlog = FALSE; -static my_bool innobase_rollback_on_timeout = FALSE; -static my_bool innobase_create_status_file = FALSE; -my_bool innobase_stats_on_metadata = TRUE; -static my_bool innobase_large_prefix = FALSE; -static my_bool innodb_optimize_fulltext_only = FALSE; +static ulong innobase_fast_shutdown MY_GLOBAL = 1; +static my_bool innobase_file_format_check MY_GLOBAL = TRUE; +static my_bool innobase_use_doublewrite MY_GLOBAL = TRUE; +static my_bool innobase_use_checksums MY_GLOBAL = TRUE; +static my_bool innobase_locks_unsafe_for_binlog MY_GLOBAL = FALSE; +static my_bool innobase_rollback_on_timeout MY_GLOBAL = FALSE; +static my_bool innobase_create_status_file MY_GLOBAL = FALSE; +my_bool innobase_stats_on_metadata MY_GLOBAL = TRUE; +static my_bool innobase_large_prefix MY_GLOBAL = FALSE; +static my_bool innodb_optimize_fulltext_only MY_GLOBAL = FALSE; -static char* innodb_version_str = (char*) INNODB_VERSION_STR; +static char* innodb_version_str MY_GLOBAL = (char*) INNODB_VERSION_STR; /** Note we cannot use rec_format_enum because we do not allow COMPRESSED row format for innodb_default_row_format option. */ @@ -231,7 +231,7 @@ get_row_format( } } -static ulong innodb_default_row_format = DEFAULT_ROW_FORMAT_DYNAMIC; +static ulong innodb_default_row_format MY_GLOBAL = DEFAULT_ROW_FORMAT_DYNAMIC; #ifdef UNIV_DEBUG /** Values for --innodb-debug-compress names. */ @@ -17988,8 +17988,8 @@ innodb_change_buffer_max_size_update( } #ifdef UNIV_DEBUG -ulong srv_fil_make_page_dirty_debug = 0; -ulong srv_saved_page_number_debug = 0; +ulong srv_fil_make_page_dirty_debug MY_GLOBAL = 0; +ulong srv_saved_page_number_debug MY_GLOBAL = 0; /****************************************************************//** Save an InnoDB page number. */ @@ -18648,7 +18648,7 @@ innodb_srv_buf_dump_filename_validate( #endif /* _WIN32 */ #ifdef UNIV_DEBUG -static char* srv_buffer_pool_evict; +static char* srv_buffer_pool_evict MY_GLOBAL; /****************************************************************//** Evict all uncompressed pages of compressed tables from the buffer pool. @@ -18961,11 +18961,11 @@ innobase_fts_find_ranking( } #ifdef UNIV_DEBUG -static my_bool innodb_background_drop_list_empty = TRUE; -static my_bool innodb_purge_run_now = TRUE; -static my_bool innodb_purge_stop_now = TRUE; -static my_bool innodb_log_checkpoint_now = TRUE; -static my_bool innodb_buf_flush_list_now = TRUE; +static my_bool innodb_background_drop_list_empty MY_GLOBAL = TRUE; +static my_bool innodb_purge_run_now MY_GLOBAL = TRUE; +static my_bool innodb_purge_stop_now MY_GLOBAL = TRUE; +static my_bool innodb_log_checkpoint_now MY_GLOBAL = TRUE; +static my_bool innodb_buf_flush_list_now MY_GLOBAL = TRUE; static uint innodb_merge_threshold_set_all_debug = DICT_INDEX_MERGE_THRESHOLD_DEFAULT; @@ -19182,9 +19182,9 @@ are queried, e.g.: SELECT @@innodb_buffer_pool_dump_now; SELECT @@innodb_buffer_pool_load_now; SELECT @@innodb_buffer_pool_load_abort; */ -static my_bool innodb_buffer_pool_dump_now = FALSE; -static my_bool innodb_buffer_pool_load_now = FALSE; -static my_bool innodb_buffer_pool_load_abort = FALSE; +static my_bool innodb_buffer_pool_dump_now MY_GLOBAL = FALSE; +static my_bool innodb_buffer_pool_load_now MY_GLOBAL = FALSE; +static my_bool innodb_buffer_pool_load_abort MY_GLOBAL = FALSE; /****************************************************************//** Trigger a dump of the buffer pool if innodb_buffer_pool_dump_now is set diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc index faf6a5c2b80..2d7bbed9566 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.cc +++ b/storage/innobase/ibuf/ibuf0ibuf.cc @@ -38,7 +38,7 @@ Created 7/19/1997 Heikki Tuuri #include "btr0sea.h" #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG -my_bool srv_ibuf_disable_background_merge; +my_bool srv_ibuf_disable_background_merge MY_GLOBAL; #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ /** Number of bits describing a single page */ @@ -205,7 +205,7 @@ ibuf_use_t ibuf_use = IBUF_USE_ALL; #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG /** Flag to control insert buffer debugging. */ -uint ibuf_debug; +uint ibuf_debug MY_GLOBAL; #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ /** The insert buffer control structure */ diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 1f46f944e08..09543f175b6 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -60,7 +60,7 @@ Created 5/7/1996 Heikki Tuuri #include /* Flag to enable/disable deadlock detector. */ -my_bool innobase_deadlock_detect = TRUE; +my_bool innobase_deadlock_detect MY_GLOBAL = TRUE; /** Total number of cached record locks */ static const ulint REC_LOCK_CACHE = 8; diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc index 69ae0fdcb2d..867cb11ee96 100644 --- a/storage/innobase/log/log0log.cc +++ b/storage/innobase/log/log0log.cc @@ -95,7 +95,7 @@ reduce the size of the log. log_t* log_sys = NULL; /** Whether to generate and require checksums on the redo log pages */ -my_bool innodb_log_checksums; +my_bool innodb_log_checksums MY_GLOBAL; /** Pointer to the log checksum calculation function */ log_checksum_func_t log_checksum_algorithm_ptr; diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc index 07380fdf5bc..85de705ce7d 100644 --- a/storage/innobase/page/page0zip.cc +++ b/storage/innobase/page/page0zip.cc @@ -83,11 +83,11 @@ page_zip_stat_per_index_t page_zip_stat_per_index; #endif /* !UNIV_HOTBACKUP */ /* Compression level to be used by zlib. Settable by user. */ -uint page_zip_level = DEFAULT_COMPRESSION_LEVEL; +uint page_zip_level MY_GLOBAL = DEFAULT_COMPRESSION_LEVEL; /* Whether or not to log compressed page images to avoid possible compression algorithm changes in zlib. */ -my_bool page_zip_log_pages = true; +my_bool page_zip_log_pages MY_GLOBAL = true; /* Please refer to ../include/page0zip.ic for a description of the compressed page format. */ diff --git a/storage/innobase/row/row0ftsort.cc b/storage/innobase/row/row0ftsort.cc index 540ce2d26e1..21108c176d3 100644 --- a/storage/innobase/row/row0ftsort.cc +++ b/storage/innobase/row/row0ftsort.cc @@ -58,7 +58,7 @@ Created 10/13/2010 Jimmy Yang } while (0) /** Parallel sort degree */ -ulong fts_sort_pll_degree = 2; +ulong fts_sort_pll_degree MY_GLOBAL = 2; /*********************************************************************//** Create a temporary "fts sort index" used to merge sort the diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index 5d0919a322b..a9ad95322cf 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -60,7 +60,7 @@ Completed by Sunny Bains and Marko Makela #endif /* _WIN32 */ /* Whether to disable file system cache */ -char srv_disable_sort_file_cache; +char srv_disable_sort_file_cache MY_GLOBAL; /** Class that caches index row tuples made from a single cluster index page scan, and then insert into corresponding index tree */ diff --git a/storage/innobase/srv/srv0conc.cc b/storage/innobase/srv/srv0conc.cc index af643feabe8..919a4374aa4 100644 --- a/storage/innobase/srv/srv0conc.cc +++ b/storage/innobase/srv/srv0conc.cc @@ -55,12 +55,12 @@ Created 2011/04/18 Sunny Bains /** 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; +ulong srv_n_free_tickets_to_enter MY_GLOBAL = 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; +ulong srv_thread_sleep_delay MY_GLOBAL = 10000; /** We are prepared for a situation that we have this many threads waiting for @@ -73,7 +73,7 @@ ulint srv_max_n_threads = 0; 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; +ulong srv_thread_concurrency MY_GLOBAL = 0; /** Variables tracking the active and waiting threads. */ struct srv_conc_t { diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 76edb893f8d..7d179e13bdd 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -86,7 +86,7 @@ Created 10/8/1995 Heikki Tuuri #endif /* UNIV_PFS_THREAD */ /* The following is the maximum allowed duration of a lock wait. */ -ulong srv_fatal_semaphore_wait_threshold = 600; +ulong srv_fatal_semaphore_wait_threshold MY_GLOBAL = 600; /* How much data manipulation language (DML) statements need to be delayed, in microseconds, in order to reduce the lagging of the purge thread. */ @@ -114,10 +114,10 @@ names, where the file name itself may also contain a path */ char* srv_data_home = NULL; /** Rollback files directory, can be absolute. */ -char* srv_undo_dir = NULL; +char* srv_undo_dir MY_GLOBAL = NULL; /** The number of tablespaces to use for rollback segments. */ -ulong srv_undo_tablespaces = 0; +ulong srv_undo_tablespaces MY_GLOBAL = 0; /** The number of UNDO tablespaces that are open and ready to use. */ ulint srv_undo_tablespaces_open = 0; @@ -128,11 +128,11 @@ any of the rollback-segment based on configuration used. */ ulint srv_undo_tablespaces_active = 0; /* The number of rollback segments to use */ -ulong srv_rollback_segments = 1; +ulong srv_rollback_segments MY_GLOBAL = 1; /* Used for the deprecated setting innodb_undo_logs. This will still get put into srv_rollback_segments if it is set to a non-default value. */ -ulong srv_undo_logs = 0; +ulong srv_undo_logs MY_GLOBAL = 0; const char* deprecated_undo_logs = "The parameter innodb_undo_logs is deprecated" " and may be removed in future releases." @@ -141,14 +141,14 @@ const char* deprecated_undo_logs = /** Rate at which UNDO records should be purged. */ -ulong srv_purge_rseg_truncate_frequency = 128; +ulong srv_purge_rseg_truncate_frequency MY_GLOBAL = 128; /** Enable or Disable Truncate of UNDO tablespace. Note: If enabled then UNDO tablespace will be selected for truncate. While Server waits for undo-tablespace to truncate if user disables it, truncate action is completed but no new tablespace is marked for truncate (action is never aborted). */ -my_bool srv_undo_log_truncate = FALSE; +my_bool srv_undo_log_truncate MY_GLOBAL = FALSE; /** Maximum size of undo tablespace. */ unsigned long long srv_max_undo_log_size; @@ -164,10 +164,10 @@ const ulint SRV_UNDO_TABLESPACE_SIZE_IN_PAGES = /** Set if InnoDB must operate in read-only mode. We don't do any recovery and open all tables in RO mode instead of RW mode. We don't sync the max trx id to disk either. */ -my_bool srv_read_only_mode; +my_bool srv_read_only_mode MY_GLOBAL; /** store to its own file each table created by an user; data dictionary tables are in the system tablespace 0 */ -my_bool srv_file_per_table; +my_bool srv_file_per_table MY_GLOBAL; /** The file format to use on new *.ibd files. */ ulint srv_file_format = 0; /** Whether to check file format during startup. A value of @@ -186,7 +186,7 @@ my_bool high_level_read_only; on duplicate key checking and foreign key checking */ ibool srv_locks_unsafe_for_binlog = FALSE; /** Sort buffer size in index creation */ -ulong srv_sort_buf_size = 1048576; +ulong srv_sort_buf_size MY_GLOBAL = 1048576; /** Maximum modification log file size for online index creation */ unsigned long long srv_online_max_size; @@ -194,11 +194,11 @@ unsigned long long srv_online_max_size; OS (provided we compiled Innobase with it in), otherwise we will use simulated aio we build below with threads. Currently we support native aio on windows and linux */ -my_bool srv_use_native_aio = TRUE; +my_bool srv_use_native_aio MY_GLOBAL = TRUE; #ifdef UNIV_DEBUG /** Force all user tables to use page compression. */ -ulong srv_debug_compress; +ulong srv_debug_compress MY_GLOBAL; /** Used by SET GLOBAL innodb_master_thread_disabled_debug = X. */ my_bool srv_master_thread_disabled_debug; /** Event used to inform that master thread is disabled. */ @@ -209,9 +209,9 @@ extern bool trx_commit_disallowed; #endif /* UNIV_DEBUG */ /*------------------------- LOG FILES ------------------------ */ -char* srv_log_group_home_dir = NULL; +char* srv_log_group_home_dir MY_GLOBAL = NULL; -ulong srv_n_log_files = SRV_N_LOG_FILES_MAX; +ulong srv_n_log_files MY_GLOBAL = SRV_N_LOG_FILES_MAX; /** At startup, this is the current redo log file size. During startup, if this is different from srv_log_file_size_requested (innodb_log_file_size), the redo log will be rebuilt and this size @@ -225,20 +225,20 @@ ib_uint64_t srv_log_file_size; ib_uint64_t srv_log_file_size_requested; /* size in database pages */ ulint srv_log_buffer_size = ULINT_MAX; -ulong srv_flush_log_at_trx_commit = 1; -uint srv_flush_log_at_timeout = 1; -ulong srv_page_size = UNIV_PAGE_SIZE_DEF; +ulong srv_flush_log_at_trx_commit MY_GLOBAL = 1; +uint srv_flush_log_at_timeout MY_GLOBAL = 1; +ulong srv_page_size MY_GLOBAL = UNIV_PAGE_SIZE_DEF; ulong srv_page_size_shift = UNIV_PAGE_SIZE_SHIFT_DEF; -ulong srv_log_write_ahead_size = 0; +ulong srv_log_write_ahead_size MY_GLOBAL = 0; page_size_t univ_page_size(0, 0, false); /* Try to flush dirty pages so as to avoid IO bursts at the checkpoints. */ -char srv_adaptive_flushing = TRUE; +char srv_adaptive_flushing MY_GLOBAL = TRUE; /* Allow IO bursts at the checkpoints ignoring io_capacity setting. */ -my_bool srv_flush_sync = TRUE; +my_bool srv_flush_sync MY_GLOBAL = TRUE; /** Maximum number of times allowed to conditionally acquire mutex before switching to blocking wait on the mutex */ @@ -258,17 +258,17 @@ const ulint srv_buf_pool_min_size = 5 * 1024 * 1024; const ulint srv_buf_pool_def_size = 128 * 1024 * 1024; /** Requested buffer pool chunk size. Each buffer pool instance consists of one or more chunks. */ -ulonglong srv_buf_pool_chunk_unit; +ulonglong srv_buf_pool_chunk_unit MY_GLOBAL; /** Requested number of buffer pool instances */ -ulong srv_buf_pool_instances; +ulong srv_buf_pool_instances MY_GLOBAL; /** Default number of buffer pool instances */ const ulong srv_buf_pool_instances_default = 0; /** Number of locks to protect buf_pool->page_hash */ -ulong srv_n_page_hash_locks = 16; +ulong srv_n_page_hash_locks MY_GLOBAL = 16; /** Scan depth for LRU flush batch i.e.: number of blocks scanned*/ -ulong srv_LRU_scan_depth = 1024; +ulong srv_LRU_scan_depth MY_GLOBAL = 1024; /** Whether or not to flush neighbors of a block */ -ulong srv_flush_neighbors = 1; +ulong srv_flush_neighbors MY_GLOBAL = 1; /** Previously requested size */ ulint srv_buf_pool_old_size = 0; /** Current size as scaling factor for the other components */ @@ -276,7 +276,7 @@ ulint srv_buf_pool_base_size = 0; /** Current size in bytes */ ulint srv_buf_pool_curr_size = 0; /** Dump this % of each buffer pool during BP dump */ -ulong srv_buf_pool_dump_pct; +ulong srv_buf_pool_dump_pct MY_GLOBAL; /** Lock table size in bytes */ ulint srv_lock_table_size = ULINT_MAX; @@ -286,15 +286,15 @@ ulint srv_n_read_io_threads = ULINT_MAX; ulint srv_n_write_io_threads = ULINT_MAX; /* Switch to enable random read ahead. */ -my_bool srv_random_read_ahead = FALSE; +my_bool srv_random_read_ahead MY_GLOBAL = FALSE; /* User settable value of the number of pages that must be present in the buffer cache and accessed sequentially for InnoDB to trigger a readahead request. */ -ulong srv_read_ahead_threshold = 56; +ulong srv_read_ahead_threshold MY_GLOBAL = 56; /** Maximum on-disk size of change buffer in terms of percentage of the buffer pool. */ -uint srv_change_buffer_max_size = CHANGE_BUFFER_DEFAULT_SIZE; +uint srv_change_buffer_max_size MY_GLOBAL = CHANGE_BUFFER_DEFAULT_SIZE; /* This parameter is used to throttle the number of insert buffers that are merged in a batch. By increasing this parameter on a faster disk you can @@ -316,37 +316,37 @@ enum srv_win_flush_t srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; ulint srv_max_n_open_files = 300; /* Number of IO operations per second the server can do */ -ulong srv_io_capacity = 200; -ulong srv_max_io_capacity = 400; +ulong srv_io_capacity MY_GLOBAL = 200; +ulong srv_max_io_capacity MY_GLOBAL = 400; /* The number of page cleaner threads to use.*/ -ulong srv_n_page_cleaners = 4; +ulong srv_n_page_cleaners MY_GLOBAL = 4; /* The InnoDB main thread tries to keep the ratio of modified pages in the buffer pool to all database pages in the buffer pool smaller than the following number. But it is not guaranteed that the value stays below that during a time of heavy update/insert activity. */ -double srv_max_buf_pool_modified_pct = 75.0; +double srv_max_buf_pool_modified_pct MY_GLOBAL = 75.0; double srv_max_dirty_pages_pct_lwm = 0.0; /* This is the percentage of log capacity at which adaptive flushing, if enabled, will kick in. */ -ulong srv_adaptive_flushing_lwm = 10; +ulong srv_adaptive_flushing_lwm MY_GLOBAL = 10; /* Number of iterations over which adaptive flushing is averaged. */ ulong srv_flushing_avg_loops = 30; /* The number of purge threads to use.*/ -ulong srv_n_purge_threads = 4; +ulong srv_n_purge_threads MY_GLOBAL = 4; /* the number of pages to purge in one batch */ -ulong srv_purge_batch_size = 20; +ulong srv_purge_batch_size MY_GLOBAL = 20; /* Internal setting for "innodb_stats_method". Decides how InnoDB treats NULL value when collecting statistics. By default, it is set to SRV_STATS_NULLS_EQUAL(0), ie. all NULL value are treated equal */ -ulong srv_innodb_stats_method = SRV_STATS_NULLS_EQUAL; +ulong srv_innodb_stats_method MY_GLOBAL = SRV_STATS_NULLS_EQUAL; srv_stats_t srv_stats; @@ -357,19 +357,19 @@ export_var_t export_vars; starting from SRV_FORCE_IGNORE_CORRUPT, so that data can be recovered by SELECT or mysqldump. When this is nonzero, we do not allow any user modifications to the data. */ -ulong srv_force_recovery; +ulong srv_force_recovery MY_GLOBAL; #ifndef DBUG_OFF /** Inject a crash at different steps of the recovery process. This is for testing and debugging only. */ -ulong srv_force_recovery_crash; +ulong srv_force_recovery_crash MY_GLOBAL; #endif /* !DBUG_OFF */ /** Print all user-level transactions deadlocks to mysqld stderr */ -my_bool srv_print_all_deadlocks = FALSE; +my_bool srv_print_all_deadlocks MY_GLOBAL = FALSE; /** Enable INFORMATION_SCHEMA.innodb_cmp_per_index */ -my_bool srv_cmp_per_index_enabled = FALSE; +my_bool srv_cmp_per_index_enabled MY_GLOBAL = FALSE; /* If the following is set to 1 then we do not run purge and insert buffer merge to completion before shutdown. If it is set to 2, do not even flush the @@ -386,11 +386,11 @@ this many index pages, there are 2 ways to calculate statistics: in the innodb database. * quick transient stats, that are used if persistent stats for the given table/index are not found in the innodb database */ -unsigned long long srv_stats_transient_sample_pages = 8; -my_bool srv_stats_persistent = TRUE; -my_bool srv_stats_include_delete_marked = FALSE; +unsigned long long srv_stats_transient_sample_pages MY_GLOBAL = 8; +my_bool srv_stats_persistent MY_GLOBAL = TRUE; +my_bool srv_stats_include_delete_marked MY_GLOBAL = FALSE; unsigned long long srv_stats_persistent_sample_pages = 20; -my_bool srv_stats_auto_recalc = TRUE; +my_bool srv_stats_auto_recalc MY_GLOBAL = TRUE; ibool srv_use_doublewrite_buf = TRUE; @@ -398,13 +398,13 @@ ibool srv_use_doublewrite_buf = TRUE; The following parameter is the size of the buffer that is used for batch flushing i.e.: LRU flushing and flush_list flushing. The rest of the pages are used for single page flushing. */ -ulong srv_doublewrite_batch_size = 120; +ulong srv_doublewrite_batch_size MY_GLOBAL = 120; -ulong srv_replication_delay = 0; +ulong srv_replication_delay MY_GLOBAL = 0; /*-------------------------------------------*/ -ulong srv_n_spin_wait_rounds = 30; -ulong srv_spin_wait_delay = 6; +ulong srv_n_spin_wait_rounds MY_GLOBAL = 30; +ulong srv_spin_wait_delay MY_GLOBAL = 6; ibool srv_priority_boost = TRUE; static ulint srv_n_rows_inserted_old = 0; @@ -418,8 +418,8 @@ ulint srv_available_undo_logs = 0; /* Set the following to 0 if you want InnoDB to write messages on stderr on startup/shutdown. */ ibool srv_print_verbose_log = TRUE; -my_bool srv_print_innodb_monitor = FALSE; -my_bool srv_print_innodb_lock_monitor = FALSE; +my_bool srv_print_innodb_monitor MY_GLOBAL = FALSE; +my_bool srv_print_innodb_lock_monitor MY_GLOBAL = FALSE; /* Array of English strings describing the current state of an i/o handler thread */ @@ -613,12 +613,12 @@ os_event_t srv_buf_dump_event; os_event_t srv_buf_resize_event; /** The buffer pool dump/load file name */ -char* srv_buf_dump_filename; +char* srv_buf_dump_filename MY_GLOBAL; /** Boolean config knobs that tell InnoDB to dump the buffer pool at shutdown and/or load it during startup. */ -char srv_buffer_pool_dump_at_shutdown = TRUE; -char srv_buffer_pool_load_at_startup = TRUE; +char srv_buffer_pool_dump_at_shutdown MY_GLOBAL = TRUE; +char srv_buffer_pool_load_at_startup MY_GLOBAL = TRUE; /** Slot index in the srv_sys->sys_threads array for the purge thread. */ static const ulint SRV_PURGE_SLOT = 1; diff --git a/storage/innobase/sync/sync0arr.cc b/storage/innobase/sync/sync0arr.cc index 720e3355304..7cc35219ba6 100644 --- a/storage/innobase/sync/sync0arr.cc +++ b/storage/innobase/sync/sync0arr.cc @@ -166,7 +166,7 @@ struct sync_array_t { }; /** User configured sync array size */ -ulong srv_sync_array_size = 1; +ulong srv_sync_array_size MY_GLOBAL = 1; /** Locally stored copy of srv_sync_array_size */ ulint sync_array_size; diff --git a/storage/innobase/sync/sync0debug.cc b/storage/innobase/sync/sync0debug.cc index 8fdb29ab26e..7d54f61fcea 100644 --- a/storage/innobase/sync/sync0debug.cc +++ b/storage/innobase/sync/sync0debug.cc @@ -51,7 +51,7 @@ Created 2012-08-21 Sunny Bains #ifdef UNIV_DEBUG -my_bool srv_sync_debug; +my_bool srv_sync_debug MY_GLOBAL; /** The global mutex which protects debug info lists of all rw-locks. To modify the debug info list of an rw-lock, this mutex has to be diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index fcab78d6de2..e2e5a46ce1a 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -59,10 +59,10 @@ Created 3/26/1996 Heikki Tuuri #include "trx0trx.h" /** Maximum allowable purge history length. <=0 means 'infinite'. */ -ulong srv_max_purge_lag = 0; +ulong srv_max_purge_lag MY_GLOBAL = 0; /** Max DML user threads delay in micro-seconds. */ -ulong srv_max_purge_lag_delay = 0; +ulong srv_max_purge_lag_delay MY_GLOBAL = 0; /** The global data structure coordinating a purge */ trx_purge_t* purge_sys = NULL; @@ -72,7 +72,7 @@ which needs no purge */ trx_undo_rec_t trx_purge_dummy_rec; #ifdef UNIV_DEBUG -my_bool srv_purge_view_update_only_debug; +my_bool srv_purge_view_update_only_debug MY_GLOBAL; bool trx_commit_disallowed = false; #endif /* UNIV_DEBUG */ diff --git a/storage/innobase/trx/trx0sys.cc b/storage/innobase/trx/trx0sys.cc index 1e553d91373..0a88d049e86 100644 --- a/storage/innobase/trx/trx0sys.cc +++ b/storage/innobase/trx/trx0sys.cc @@ -143,7 +143,7 @@ ReadView::check_trx_id_sanity( #ifndef UNIV_HOTBACKUP #ifdef UNIV_DEBUG /* Flag to control TRX_RSEG_N_SLOTS behavior debugging. */ -uint trx_rseg_n_slots_debug = 0; +uint trx_rseg_n_slots_debug MY_GLOBAL = 0; #endif /** This is used to track the maximum file format id known to InnoDB. It's diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 9bc486c881e..9d4931dfb15 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -42,8 +42,8 @@ using std::min; using std::max; -ulonglong myisam_recover_options; -static ulong opt_myisam_block_size; +ulonglong myisam_recover_options MY_GLOBAL; +static ulong opt_myisam_block_size MY_GLOBAL; /* Interface to mysqld, to check system tables supported by SE */ static bool myisam_is_supported_system_table(const char *db, diff --git a/storage/myisam/mi_static.c b/storage/myisam/mi_static.c index 8a6a7a3aab6..4178830e739 100644 --- a/storage/myisam/mi_static.c +++ b/storage/myisam/mi_static.c @@ -41,9 +41,9 @@ ulong myisam_block_size= MI_KEY_BLOCK_LENGTH; /* Best by test */ my_bool myisam_flush=0, myisam_delay_key_write=0, myisam_single_user=0; /* Assume that we are in a single threaded program by default. */ ulong myisam_concurrent_insert= 0; -ulonglong myisam_max_temp_length= MAX_FILE_SIZE; -ulong myisam_data_pointer_size=4; -ulonglong myisam_mmap_size= SIZE_T_MAX, myisam_mmap_used= 0; +ulonglong myisam_max_temp_length MY_GLOBAL= MAX_FILE_SIZE; +ulong myisam_data_pointer_size MY_GLOBAL=4; +ulonglong myisam_mmap_size MY_GLOBAL= SIZE_T_MAX, myisam_mmap_used= 0; /* Keycache thread state for the main thread or single threaded programs. */ st_keycache_thread_var main_thread_keycache_var; /* Key used by myisamchk */ diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c index 6535749d93b..b69ea7951a1 100644 --- a/storage/myisam/myisamchk.c +++ b/storage/myisam/myisamchk.c @@ -38,7 +38,7 @@ static char **default_argv; static const char *load_default_groups[]= { "myisamchk", 0 }; static const char *set_collation_name, *opt_tmpdir; static CHARSET_INFO *set_collation; -static long opt_myisam_block_size; +static long opt_myisam_block_size MY_GLOBAL; static long opt_key_cache_block_size; static const char *my_progname_short; static int stopwords_inited= 0;