mariadb/server-tools/instance-manager/parse_output.h
unknown 4ffd997a8e 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.
2007-07-23 15:05:50 +02:00

33 lines
1.3 KiB
C

#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_PARSE_OUTPUT_H
#define INCLUDES_MYSQL_INSTANCE_MANAGER_PARSE_OUTPUT_H
/* Copyright (C) 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <my_global.h>
enum enum_option_type
{
GET_VALUE = 1,
GET_LINE
};
bool parse_output_and_get_value(const char *command,
const char *option_name_str,
uint option_name_length,
char *option_value_buf,
size_t option_value_buf_size,
enum_option_type option_type);
#endif /* INCLUDES_MYSQL_INSTANCE_MANAGER_PARSE_OUTPUT_H */