mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
IM mostly fixed according to Brian's directions. Will need to do some additional option handling and cleanups
server-tools/instance-manager/Makefile.am: New file added server-tools/instance-manager/client_func.c: typo fixed server-tools/instance-manager/commands.cc: there are no admin-user snd admin-password fields anymore, so no need to show their values server-tools/instance-manager/guardian.cc: Syncronization added -- now guardian wakes up whenever SIGCLD has been catched server-tools/instance-manager/guardian.h: Condition variable declared server-tools/instance-manager/instance.cc: Persistent connection to the instance removed. Now we use SIGTERM instead of com_shutdown for STOP. We also manage SIGCHLD ourselves now (therefore no double fork). server-tools/instance-manager/instance.h: Pointer to the instance_map added, MySQL connection structures removed server-tools/instance-manager/instance_map.cc: More syncronization added (to make proper STOP) server-tools/instance-manager/instance_map.h: added condition variable and mutex for connection threads to wait for SIGCHLD server-tools/instance-manager/instance_options.cc: defaults-handling methods have been added. server-tools/instance-manager/instance_options.h: New functions and constants declared server-tools/instance-manager/listener.cc: No changes here (bk bug?) server-tools/instance-manager/manager.cc: SIGCHLD handling added
This commit is contained in:
@ -38,8 +38,8 @@ class Instance_options
|
||||
public:
|
||||
Instance_options() :
|
||||
mysqld_socket(0), mysqld_datadir(0), mysqld_bind_address(0),
|
||||
mysqld_pid_file(0), mysqld_port(0), mysqld_path(0), mysqld_user(0),
|
||||
mysqld_password(0), is_guarded(0), filled_default_options(0)
|
||||
mysqld_pid_file(0), mysqld_port(0), mysqld_path(0), is_guarded(0),
|
||||
filled_default_options(0)
|
||||
{}
|
||||
~Instance_options();
|
||||
/* fills in argv */
|
||||
@ -49,9 +49,17 @@ public:
|
||||
|
||||
int add_option(const char* option);
|
||||
int init(const char *instance_name_arg);
|
||||
pid_t get_pid();
|
||||
void get_pid_filename(char *result);
|
||||
int unlink_pidfile();
|
||||
|
||||
public:
|
||||
enum { MAX_NUMBER_OF_DEFAULT_OPTIONS= 1 };
|
||||
/*
|
||||
We need this value to be greater or equal then FN_REFLEN found in
|
||||
my_global.h to use my_load_path()
|
||||
*/
|
||||
enum { MAX_PATH_LEN= 512 };
|
||||
enum { MAX_NUMBER_OF_DEFAULT_OPTIONS= 2 };
|
||||
enum { MEM_ROOT_BLOCK_SIZE= 512 };
|
||||
char **argv;
|
||||
/* We need the some options, so we store them as a separate pointers */
|
||||
@ -63,12 +71,12 @@ public:
|
||||
uint instance_name_len;
|
||||
const char *instance_name;
|
||||
const char *mysqld_path;
|
||||
const char *mysqld_user;
|
||||
const char *mysqld_password;
|
||||
const char *is_guarded;
|
||||
DYNAMIC_ARRAY options_array;
|
||||
private:
|
||||
int add_to_argv(const char *option);
|
||||
int get_default_option(char *result, const char *option_name,
|
||||
size_t result_len);
|
||||
private:
|
||||
uint filled_default_options;
|
||||
MEM_ROOT alloc;
|
||||
|
Reference in New Issue
Block a user