mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Post-review fixes + some bugs fixed + several minor features
This commit is contained in:
@ -120,9 +120,6 @@ Instance_map::Instance_map(const char *default_mysqld_path_arg)
|
||||
|
||||
int Instance_map::init()
|
||||
{
|
||||
pthread_mutex_init(&pid_cond.LOCK_pid, 0);
|
||||
pthread_cond_init(&pid_cond.COND_pid, 0);
|
||||
|
||||
if (hash_init(&hash, default_charset_info, START_HASH_SIZE, 0, 0,
|
||||
get_instance_key, delete_instance, 0))
|
||||
return 1;
|
||||
@ -135,8 +132,6 @@ Instance_map::~Instance_map()
|
||||
hash_free(&hash);
|
||||
pthread_mutex_unlock(&LOCK_instance_map);
|
||||
pthread_mutex_destroy(&LOCK_instance_map);
|
||||
pthread_mutex_destroy(&pid_cond.LOCK_pid);
|
||||
pthread_cond_destroy(&pid_cond.COND_pid);
|
||||
}
|
||||
|
||||
|
||||
@ -198,21 +193,6 @@ void Instance_map::complete_initialization()
|
||||
}
|
||||
|
||||
|
||||
Instance *
|
||||
Instance_map::find(uint instance_number)
|
||||
{
|
||||
Instance *instance;
|
||||
char name[80];
|
||||
|
||||
snprintf(name, sizeof(name) - 1, "mysqld%i", instance_number);
|
||||
name[sizeof(name) - 1]= 0; /* safety */
|
||||
pthread_mutex_lock(&LOCK_instance_map);
|
||||
instance= (Instance *) hash_search(&hash, (byte *) name, strlen(name));
|
||||
pthread_mutex_unlock(&LOCK_instance_map);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
/* load options from config files and create appropriate instance structures */
|
||||
|
||||
int Instance_map::load()
|
||||
|
Reference in New Issue
Block a user