diff options
Diffstat (limited to 'server-tools')
-rw-r--r-- | server-tools/instance-manager/commands.h | 1 | ||||
-rw-r--r-- | server-tools/instance-manager/guardian.cc | 6 | ||||
-rw-r--r-- | server-tools/instance-manager/instance_options.cc | 2 | ||||
-rw-r--r-- | server-tools/instance-manager/mysql_connection.cc | 6 | ||||
-rw-r--r-- | server-tools/instance-manager/options.cc | 16 | ||||
-rw-r--r-- | server-tools/instance-manager/options.h | 1 | ||||
-rw-r--r-- | server-tools/instance-manager/parse.cc | 1 | ||||
-rw-r--r-- | server-tools/instance-manager/user_map.cc | 1 | ||||
-rw-r--r-- | server-tools/instance-manager/user_map.h | 1 |
9 files changed, 18 insertions, 17 deletions
diff --git a/server-tools/instance-manager/commands.h b/server-tools/instance-manager/commands.h index bfd38d34889..c7b3445d1f8 100644 --- a/server-tools/instance-manager/commands.h +++ b/server-tools/instance-manager/commands.h @@ -163,6 +163,7 @@ public: class Syntax_error : public Command { public: + Syntax_error() {} int execute(struct st_net *net, ulong connection_id); }; diff --git a/server-tools/instance-manager/guardian.cc b/server-tools/instance-manager/guardian.cc index 0a037b5b98a..0bcd40797a6 100644 --- a/server-tools/instance-manager/guardian.cc +++ b/server-tools/instance-manager/guardian.cc @@ -78,7 +78,7 @@ void Guardian_thread::request_shutdown() void Guardian_thread::process_instance(Instance *instance, GUARD_NODE *current_node, - LIST **guarded_instances, + LIST **guarded_instances_arg, LIST *node) { uint waitchild= (uint) Instance::DEFAULT_SHUTDOWN_DELAY; @@ -94,7 +94,7 @@ void Guardian_thread::process_instance(Instance *instance, /* this returns true if and only if an instance was stopped for sure */ if (instance->is_crashed()) - *guarded_instances= list_delete(*guarded_instances, node); + *guarded_instances_arg= list_delete(*guarded_instances_arg, node); else if ( (uint) (current_time - current_node->last_checked) > waitchild) { instance->kill_instance(SIGKILL); @@ -102,7 +102,7 @@ void Guardian_thread::process_instance(Instance *instance, Later we do node= node->next. This is ok, as we are only removing the node from the list. The pointer to the next one is still valid. */ - *guarded_instances= list_delete(*guarded_instances, node); + *guarded_instances_arg= list_delete(*guarded_instances_arg, node); } return; diff --git a/server-tools/instance-manager/instance_options.cc b/server-tools/instance-manager/instance_options.cc index f86f359959b..1e47119369f 100644 --- a/server-tools/instance-manager/instance_options.cc +++ b/server-tools/instance-manager/instance_options.cc @@ -222,8 +222,6 @@ err: int Instance_options::fill_log_options() { Buffer buff; - uint position= 0; - char **tmp_argv= argv; enum { MAX_LOG_OPTION_LENGTH= 256 }; char datadir[MAX_LOG_OPTION_LENGTH]; char hostname[MAX_LOG_OPTION_LENGTH]; diff --git a/server-tools/instance-manager/mysql_connection.cc b/server-tools/instance-manager/mysql_connection.cc index a19914dfdd2..e52f70cf449 100644 --- a/server-tools/instance-manager/mysql_connection.cc +++ b/server-tools/instance-manager/mysql_connection.cc @@ -333,12 +333,12 @@ int Mysql_connection_thread::dispatch_command(enum enum_server_command command, { log_info("query for connection %lu : ----\n%s\n-------------------------", connection_id,packet); - if (Command *command= parse_command(&instance_map, packet)) + if (Command *com= parse_command(&instance_map, packet)) { int res= 0; log_info("query for connection %lu successefully parsed",connection_id); - res= command->execute(&net, connection_id); - delete command; + res= com->execute(&net, connection_id); + delete com; if (!res) log_info("query for connection %lu executed ok",connection_id); else diff --git a/server-tools/instance-manager/options.cc b/server-tools/instance-manager/options.cc index c6c709295bc..ec71b6495b8 100644 --- a/server-tools/instance-manager/options.cc +++ b/server-tools/instance-manager/options.cc @@ -313,27 +313,27 @@ int Options::load(int argc, char **argv) '.angel.pid'. */ - char *angel_pid_file_name; + char *local_angel_pid_file_name; char *base_name_ptr; char *ext_ptr; - angel_pid_file_name= (char *) malloc(strlen(Options::pid_file_name) + - ANGEL_PID_FILE_SUFFIX_LEN); + local_angel_pid_file_name= (char *) malloc(strlen(Options::pid_file_name) + + ANGEL_PID_FILE_SUFFIX_LEN); - strcpy(angel_pid_file_name, Options::pid_file_name); + strcpy(local_angel_pid_file_name, Options::pid_file_name); - base_name_ptr= strrchr(angel_pid_file_name, '/'); + base_name_ptr= strrchr(local_angel_pid_file_name, '/'); if (!base_name_ptr) - base_name_ptr= angel_pid_file_name + 1; + base_name_ptr= local_angel_pid_file_name + 1; ext_ptr= strrchr(base_name_ptr, '.'); if (ext_ptr) *ext_ptr= 0; - strcat(angel_pid_file_name, ANGEL_PID_FILE_SUFFIX); + strcat(local_angel_pid_file_name, ANGEL_PID_FILE_SUFFIX); - Options::angel_pid_file_name= angel_pid_file_name; + Options::angel_pid_file_name= local_angel_pid_file_name; } else { diff --git a/server-tools/instance-manager/options.h b/server-tools/instance-manager/options.h index f32e106bd7a..9eb856de917 100644 --- a/server-tools/instance-manager/options.h +++ b/server-tools/instance-manager/options.h @@ -53,6 +53,7 @@ struct Options static char **saved_argv; int load(int argc, char **argv); + Options() {} void cleanup(); #ifdef __WIN__ int setup_windows_defaults(); diff --git a/server-tools/instance-manager/parse.cc b/server-tools/instance-manager/parse.cc index 14b3db16b45..fa6b3beaae9 100644 --- a/server-tools/instance-manager/parse.cc +++ b/server-tools/instance-manager/parse.cc @@ -125,7 +125,6 @@ Command *parse_command(Instance_map *map, const char *text) uint option_value_len; const char *log_size; Command *command; - const char *saved_text= text; bool skip= false; const char *tmp; diff --git a/server-tools/instance-manager/user_map.cc b/server-tools/instance-manager/user_map.cc index 9cb15307131..c33224d4c6b 100644 --- a/server-tools/instance-manager/user_map.cc +++ b/server-tools/instance-manager/user_map.cc @@ -30,6 +30,7 @@ struct User char user[USERNAME_LENGTH + 1]; uint8 user_length; uint8 salt[SCRAMBLE_LENGTH]; + User() {} int init(const char *line); }; diff --git a/server-tools/instance-manager/user_map.h b/server-tools/instance-manager/user_map.h index 4134017dd9b..ae3896dce44 100644 --- a/server-tools/instance-manager/user_map.h +++ b/server-tools/instance-manager/user_map.h @@ -33,6 +33,7 @@ class User_map { public: + User_map() {} ~User_map(); int init(); |