summaryrefslogtreecommitdiff
path: root/server-tools/instance-manager/portability.h
diff options
context:
space:
mode:
authorunknown <thek@adventure.(none)>2007-07-23 15:05:50 +0200
committerunknown <thek@adventure.(none)>2007-07-23 15:05:50 +0200
commit4ffd997a8e3548c186078111d23e9a6a708f4f23 (patch)
tree8967dea5df24f039d3e320847331885b6c34d598 /server-tools/instance-manager/portability.h
parentbe11de7a8ed93e5dd5d5abd1ca2e9ca5c3922db7 (diff)
downloadmariadb-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/portability.h')
-rw-r--r--server-tools/instance-manager/portability.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/server-tools/instance-manager/portability.h b/server-tools/instance-manager/portability.h
index eb677a0135c..990e6140a9e 100644
--- a/server-tools/instance-manager/portability.h
+++ b/server-tools/instance-manager/portability.h
@@ -48,11 +48,16 @@ typedef int pid_t;
#define NEWLINE "\r\n"
#define NEWLINE_LEN 2
+const char CR = '\r';
+const char LF = '\n';
+
#else /* ! __WIN__ */
#define NEWLINE "\n"
#define NEWLINE_LEN 1
+const char LF = '\n';
+
#endif /* __WIN__ */
#endif /* INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H */