diff options
author | unknown <thek@adventure.(none)> | 2007-07-23 15:05:50 +0200 |
---|---|---|
committer | unknown <thek@adventure.(none)> | 2007-07-23 15:05:50 +0200 |
commit | 4ffd997a8e3548c186078111d23e9a6a708f4f23 (patch) | |
tree | 8967dea5df24f039d3e320847331885b6c34d598 /server-tools/instance-manager/instance.cc | |
parent | be11de7a8ed93e5dd5d5abd1ca2e9ca5c3922db7 (diff) | |
download | mariadb-git-4ffd997a8e3548c186078111d23e9a6a708f4f23.tar.gz |
Bug#28012 Patch : IM crashes instead of reporting an error when mysqldpath is bad
On the windows platform, if an instance object failed to initialize during
program start, the instance manager would crash.
This could happen if an incorrect mysqld path was supplied in the
defaults configuration file.
The patch prevents the program from crashing and makes it show an
error message instead.
mysql-test/r/im_options.result:
- Options have changed names.
server-tools/instance-manager/instance.cc:
- Added code to verify that the instance object was initialized
before any attempt is made to start the associated process.
- Instance::complete_initialization method will now return TRUE
on an error during instance initialization.
server-tools/instance-manager/instance_options.cc:
- Parsed result byte sequence from executed process doesn't contain a new line
character anymore.
server-tools/instance-manager/parse_output.cc:
- 'popen' didn't behave as intended on the windows platform.
- The function parse_output_and_get_value was completly rewritten to correct the
error in the windows built and to be more easily maintained across platforms.
server-tools/instance-manager/parse_output.h:
- 'popen' didn't behave as intended on the windows platform.
- The function parse_output_and_get_value was completly rewritten to correct the
error in the windows built and to be more easily maintained across platforms.
server-tools/instance-manager/portability.h:
- Add more portability constants for convenience.
Diffstat (limited to 'server-tools/instance-manager/instance.cc')
-rw-r--r-- | server-tools/instance-manager/instance.cc | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/server-tools/instance-manager/instance.cc b/server-tools/instance-manager/instance.cc index edc9c88fe9f..80e7e99214b 100644 --- a/server-tools/instance-manager/instance.cc +++ b/server-tools/instance-manager/instance.cc @@ -524,24 +524,17 @@ bool Instance::init(const LEX_STRING *name_arg) /** - Complete instance options initialization. + @brief Complete instance options initialization. - SYNOPSIS - complete_initialization() - - RETURN - FALSE - ok - TRUE - error + @return Error status. + @retval FALSE ok + @retval TRUE error */ bool Instance::complete_initialization() { configured= ! options.complete_initialization(); - return FALSE; - /* - TODO: return actual status (from - Instance_options::complete_initialization()) here. - */ + return !configured; } /************************************************************************** @@ -644,25 +637,24 @@ bool Instance::is_mysqld_running() /** - Start mysqld. + @brief Start mysqld. - SYNOPSIS - start_mysqld() - - DESCRIPTION - Reset flags and start Instance Monitor thread, which will start mysqld. + Reset flags and start Instance Monitor thread, which will start mysqld. - MT-NOTE: instance must be locked before calling the operation. + @note Instance must be locked before calling the operation. - RETURN - FALSE - ok - TRUE - could not start instance + @return Error status code + @retval FALSE Ok + @retval TRUE Could not start instance */ bool Instance::start_mysqld() { Instance_monitor *instance_monitor; + if (!configured) + return TRUE; + /* Prepare instance to start Instance Monitor thread. |