1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fix IM to display version string in "show instance status" (Bug #10229)

This commit is contained in:
petr@mysql.com
2005-06-01 04:40:22 +04:00
parent 329d974df7
commit c7581758ec
7 changed files with 130 additions and 36 deletions

View File

@ -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);