Commit 933db613 authored by unknown's avatar unknown

Fix for BUG#10957 "stop instance, issued after flush instances causes IM to crash"

Recommited with post-review fixes


server-tools/instance-manager/instance.cc:
  fix behaviour of monitoring routines: they should not  rely on the fact that instance object
  which was used when the instances started exists at stop(). Instead routines should save the
  name of the instance and look for it in the instance_map when needed.
server-tools/instance-manager/instance.h:
  new functions declared. functions, which were converted to static removed from the class.
server-tools/instance-manager/instance_options.cc:
  fix valgrind warning
parent 8fd77a04
This diff is collapsed.
......@@ -41,7 +41,8 @@ class Instance
/* send a signal to the instance */
void kill_instance(int signo);
int is_crashed();
void fork_and_monitor();
void set_crash_flag_n_wake_all();
Instance_map *Instance::get_map();
public:
enum { DEFAULT_SHUTDOWN_DELAY= 35 };
......@@ -63,7 +64,6 @@ class Instance
Instance_map *instance_map;
void remove_pid();
int launch_and_wait();
};
#endif /* INCLUDES_MYSQL_INSTANCE_MANAGER_INSTANCE_H */
......@@ -130,6 +130,8 @@ int Instance_options::fill_instance_version()
version_option, sizeof(version_option)))
goto err;
bzero(result, MAX_VERSION_STRING_LENGTH);
rc= parse_output_and_get_value(cmd.buffer, mysqld_path,
result, MAX_VERSION_STRING_LENGTH,
GET_LINE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment