Loading innobase/include/sync0sync.h +3 −2 Original line number Diff line number Diff line Loading @@ -522,10 +522,11 @@ extern ibool sync_order_checks_on; extern ibool sync_initialized; /* Global list of database mutexes (not OS mutexes) created. */ UT_LIST_BASE_NODE_T(mutex_t) mutex_list; typedef UT_LIST_BASE_NODE_T(mutex_t) ut_list_base_node_t; extern ut_list_base_node_t mutex_list; /* Mutex protecting the mutex_list variable */ mutex_t mutex_list_mutex; extern mutex_t mutex_list_mutex; #ifndef UNIV_NONINL Loading innobase/sync/sync0sync.c +6 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,12 @@ sync_thread_t* sync_thread_level_arrays; /* Mutex protecting sync_thread_level_arrays */ mutex_t sync_thread_mutex; /* Global list of database mutexes (not OS mutexes) created. */ ut_list_base_node_t mutex_list; /* Mutex protecting the mutex_list variable */ mutex_t mutex_list_mutex; /* Latching order checks start when this is set TRUE */ ibool sync_order_checks_on = FALSE; Loading server-tools/instance-manager/Makefile.am +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ liboptions_a_CXXFLAGS= $(CXXFLAGS) \ -DDEFAULT_MYSQLD_PATH="$(libexecdir)/mysqld$(EXEEXT)" \ -DDEFAULT_MONITORING_INTERVAL="20" \ -DDEFAULT_PORT="2273" \ -DDEFAULT_CONFIG_FILE="/etc/my.cnf" \ -DPROTOCOL_VERSION=@PROTOCOL_VERSION@ liboptions_a_SOURCES= options.h options.cc priv.h priv.cc Loading server-tools/instance-manager/commands.cc +15 −6 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include "mysql_manager_error.h" #include "protocol.h" #include "buffer.h" #include "options.h" #include <m_string.h> #include <mysql.h> Loading Loading @@ -643,6 +644,7 @@ Set_option::Set_option(Instance_map *instance_map_arg, if ((instance= instance_map->find(name, len))) { instance_name= instance->options.instance_name; /* add prefix for add_option */ if ((option_len_arg < MAX_OPTION_LEN - 1) || (option_value_len_arg < MAX_OPTION_LEN - 1)) Loading Loading @@ -689,15 +691,22 @@ int Set_option::correct_file(int skip) { int error; error= modify_defaults_file("/etc/my.cnf", option, error= modify_defaults_file(Options::config_file, option, option_value, instance_name, skip); if (error > 0) switch (error) { case 0: return 0; /* everything was fine */ case 1: return ER_OUT_OF_RESOURCES; else if (error < 0) case 2: return ER_ACCESS_OPTION_FILE; default: DBUG_ASSERT(0); /* should never get here */ } /* everything was fine */ return 0; return 0; /* keep compiler happy */ } Loading server-tools/instance-manager/instance_map.cc +18 −16 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ #include "buffer.h" #include "instance.h" #include "log.h" #include "options.h" #include <m_ctype.h> #include <mysql_com.h> Loading Loading @@ -111,9 +113,8 @@ static int process_option(void *ctx, const char *group, const char *option) C_MODE_END Instance_map::Instance_map(const char *default_mysqld_path_arg, const char *first_option_arg): mysqld_path(default_mysqld_path_arg), first_option(first_option_arg) Instance_map::Instance_map(const char *default_mysqld_path_arg): mysqld_path(default_mysqld_path_arg) { pthread_mutex_init(&LOCK_instance_map, 0); } Loading Loading @@ -202,7 +203,8 @@ int Instance_map::complete_initialization() hash_free should handle it's deletion => goto err, not err_instance. */ if (instance->complete_initialization(this, mysqld_path, DEFAULT_SINGLE_INSTANCE)) if (instance->complete_initialization(this, mysqld_path, DEFAULT_SINGLE_INSTANCE)) goto err; } else Loading Loading @@ -236,18 +238,18 @@ int Instance_map::load() /* the name of the program may be orbitrary here in fact */ argv_options[0]= "mysqlmanager"; if (first_option != NULL) { argc= 2; argv_options[1]= first_option; argv_options[2]= '\0'; } else argv_options[1]= '\0'; if (my_search_option_files("my", &argc, (char ***) &argv, &args_used, process_option, (void*) this) || complete_initialization()) /* If the routine failed, we'll simply fallback to defaults in complete_initialization(). */ if (my_search_option_files(Options::config_file, &argc, (char ***) &argv, &args_used, process_option, (void*) this)) log_info("Falling back to compiled-in defaults"); if (complete_initialization()) return 1; return 0; Loading Loading
innobase/include/sync0sync.h +3 −2 Original line number Diff line number Diff line Loading @@ -522,10 +522,11 @@ extern ibool sync_order_checks_on; extern ibool sync_initialized; /* Global list of database mutexes (not OS mutexes) created. */ UT_LIST_BASE_NODE_T(mutex_t) mutex_list; typedef UT_LIST_BASE_NODE_T(mutex_t) ut_list_base_node_t; extern ut_list_base_node_t mutex_list; /* Mutex protecting the mutex_list variable */ mutex_t mutex_list_mutex; extern mutex_t mutex_list_mutex; #ifndef UNIV_NONINL Loading
innobase/sync/sync0sync.c +6 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,12 @@ sync_thread_t* sync_thread_level_arrays; /* Mutex protecting sync_thread_level_arrays */ mutex_t sync_thread_mutex; /* Global list of database mutexes (not OS mutexes) created. */ ut_list_base_node_t mutex_list; /* Mutex protecting the mutex_list variable */ mutex_t mutex_list_mutex; /* Latching order checks start when this is set TRUE */ ibool sync_order_checks_on = FALSE; Loading
server-tools/instance-manager/Makefile.am +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ liboptions_a_CXXFLAGS= $(CXXFLAGS) \ -DDEFAULT_MYSQLD_PATH="$(libexecdir)/mysqld$(EXEEXT)" \ -DDEFAULT_MONITORING_INTERVAL="20" \ -DDEFAULT_PORT="2273" \ -DDEFAULT_CONFIG_FILE="/etc/my.cnf" \ -DPROTOCOL_VERSION=@PROTOCOL_VERSION@ liboptions_a_SOURCES= options.h options.cc priv.h priv.cc Loading
server-tools/instance-manager/commands.cc +15 −6 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include "mysql_manager_error.h" #include "protocol.h" #include "buffer.h" #include "options.h" #include <m_string.h> #include <mysql.h> Loading Loading @@ -643,6 +644,7 @@ Set_option::Set_option(Instance_map *instance_map_arg, if ((instance= instance_map->find(name, len))) { instance_name= instance->options.instance_name; /* add prefix for add_option */ if ((option_len_arg < MAX_OPTION_LEN - 1) || (option_value_len_arg < MAX_OPTION_LEN - 1)) Loading Loading @@ -689,15 +691,22 @@ int Set_option::correct_file(int skip) { int error; error= modify_defaults_file("/etc/my.cnf", option, error= modify_defaults_file(Options::config_file, option, option_value, instance_name, skip); if (error > 0) switch (error) { case 0: return 0; /* everything was fine */ case 1: return ER_OUT_OF_RESOURCES; else if (error < 0) case 2: return ER_ACCESS_OPTION_FILE; default: DBUG_ASSERT(0); /* should never get here */ } /* everything was fine */ return 0; return 0; /* keep compiler happy */ } Loading
server-tools/instance-manager/instance_map.cc +18 −16 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ #include "buffer.h" #include "instance.h" #include "log.h" #include "options.h" #include <m_ctype.h> #include <mysql_com.h> Loading Loading @@ -111,9 +113,8 @@ static int process_option(void *ctx, const char *group, const char *option) C_MODE_END Instance_map::Instance_map(const char *default_mysqld_path_arg, const char *first_option_arg): mysqld_path(default_mysqld_path_arg), first_option(first_option_arg) Instance_map::Instance_map(const char *default_mysqld_path_arg): mysqld_path(default_mysqld_path_arg) { pthread_mutex_init(&LOCK_instance_map, 0); } Loading Loading @@ -202,7 +203,8 @@ int Instance_map::complete_initialization() hash_free should handle it's deletion => goto err, not err_instance. */ if (instance->complete_initialization(this, mysqld_path, DEFAULT_SINGLE_INSTANCE)) if (instance->complete_initialization(this, mysqld_path, DEFAULT_SINGLE_INSTANCE)) goto err; } else Loading Loading @@ -236,18 +238,18 @@ int Instance_map::load() /* the name of the program may be orbitrary here in fact */ argv_options[0]= "mysqlmanager"; if (first_option != NULL) { argc= 2; argv_options[1]= first_option; argv_options[2]= '\0'; } else argv_options[1]= '\0'; if (my_search_option_files("my", &argc, (char ***) &argv, &args_used, process_option, (void*) this) || complete_initialization()) /* If the routine failed, we'll simply fallback to defaults in complete_initialization(). */ if (my_search_option_files(Options::config_file, &argc, (char ***) &argv, &args_used, process_option, (void*) this)) log_info("Falling back to compiled-in defaults"); if (complete_initialization()) return 1; return 0; Loading