summaryrefslogtreecommitdiff
path: root/server-tools/instance-manager/instance_options.h
diff options
context:
space:
mode:
authorunknown <petr@mysql.com>2005-06-01 04:40:22 +0400
committerunknown <petr@mysql.com>2005-06-01 04:40:22 +0400
commit26f03563f724b1bcab931d1120a56825135ce24c (patch)
tree9ad013e8ea02fb9d7bc9887be150da9b869ae2b7 /server-tools/instance-manager/instance_options.h
parent1c7b61e3aef5227165a9957ead000e67935708b2 (diff)
downloadmariadb-git-26f03563f724b1bcab931d1120a56825135ce24c.tar.gz
fix IM to display version string in "show instance status" (Bug #10229)
server-tools/instance-manager/buffer.h: fix for the valgring error server-tools/instance-manager/commands.cc: sent the version string server-tools/instance-manager/instance_options.cc: compute and store the version string server-tools/instance-manager/instance_options.h: add a version string option, and added caching of the mysqld_path length server-tools/instance-manager/options.cc: fix valgrind error server-tools/instance-manager/parse_output.cc: Add an option to parse_output_and_get_value in order to be able to get the rest of the string after the found word in the output of popen() (E.g. a version string). server-tools/instance-manager/parse_output.h: prototype changed
Diffstat (limited to 'server-tools/instance-manager/instance_options.h')
-rw-r--r--server-tools/instance-manager/instance_options.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/server-tools/instance-manager/instance_options.h b/server-tools/instance-manager/instance_options.h
index ebeeaa1978e..0d2c32fae66 100644
--- a/server-tools/instance-manager/instance_options.h
+++ b/server-tools/instance-manager/instance_options.h
@@ -38,7 +38,7 @@ class Instance_options
{
public:
Instance_options() :
- mysqld_socket(0), mysqld_datadir(0),
+ mysqld_version(0), mysqld_socket(0), mysqld_datadir(0),
mysqld_bind_address(0), mysqld_pid_file(0), mysqld_port(0),
mysqld_port_val(0), mysqld_path(0), nonguarded(0), shutdown_delay(0),
shutdown_delay_val(0), filled_default_options(0)
@@ -64,6 +64,11 @@ public:
enum { MEM_ROOT_BLOCK_SIZE= 512 };
char pid_file_with_path[MAX_PATH_LEN];
char **argv;
+ /*
+ Here we cache the version string, obtained from mysqld --version.
+ In the case when mysqld binary is not found we get "unknown" here.
+ */
+ const char *mysqld_version;
/* We need the some options, so we store them as a separate pointers */
const char *mysqld_socket;
const char *mysqld_datadir;
@@ -74,6 +79,7 @@ public:
const char *instance_name;
uint instance_name_len;
const char *mysqld_path;
+ uint mysqld_path_len;
const char *nonguarded;
const char *shutdown_delay;
uint shutdown_delay_val;
@@ -84,6 +90,7 @@ public:
DYNAMIC_ARRAY options_array;
private:
int fill_log_options();
+ int fill_instance_version();
int add_to_argv(const char *option);
int get_default_option(char *result, size_t result_len,
const char *option_name);