diff options
author | unknown <jimw@mysql.com> | 2006-04-12 11:14:56 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2006-04-12 11:14:56 -0700 |
commit | 29156afc9d0f03578789049460973a65b1d86fc4 (patch) | |
tree | 592122efca403ab7311a27a6abceeeaf584ace5e /server-tools | |
parent | 2116b5a69f003f54457d792b68bdc3c1519f10e6 (diff) | |
download | mariadb-git-29156afc9d0f03578789049460973a65b1d86fc4.tar.gz |
Support --debug/-# in instance manager.
mysql-test/mysql-test-run.pl:
Support tracing the instance manager
server-tools/instance-manager/options.cc:
Handle --debug/-#
server-tools/instance-manager/options.h:
Handle --debug/-#
Diffstat (limited to 'server-tools')
-rw-r--r-- | server-tools/instance-manager/options.cc | 17 | ||||
-rw-r--r-- | server-tools/instance-manager/options.h | 4 |
2 files changed, 20 insertions, 1 deletions
diff --git a/server-tools/instance-manager/options.cc b/server-tools/instance-manager/options.cc index e7d366e7457..cde8bc98692 100644 --- a/server-tools/instance-manager/options.cc +++ b/server-tools/instance-manager/options.cc @@ -57,6 +57,9 @@ uint Options::port_number= DEFAULT_PORT; char **Options::saved_argv= NULL; /* Remember if the config file was forced */ bool Options::is_forced_default_file= 0; +#ifndef DBUG_OFF +const char *Options::default_dbug_option= "d:t:i:O,im.trace"; +#endif /* List of options, accepted by the instance manager. @@ -88,6 +91,12 @@ static struct my_option my_long_options[] = { "help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, +#ifndef DBUG_OFF + {"debug", '#', "Debug log.", + (gptr*) &Options::default_dbug_option, (gptr*) &Options::default_dbug_option, + 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, +#endif + { "log", OPT_LOG, "Path to log file. Used only with --run-as-service.", (gptr *) &Options::log_file_name, (gptr *) &Options::log_file_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, @@ -226,7 +235,7 @@ C_MODE_START static my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), - char *argument __attribute__((unused))) + char *argument) { switch(optid) { case 'V': @@ -238,6 +247,12 @@ get_one_option(int optid, case '?': usage(); exit(0); + case '#': +#ifndef DBUG_OFF + DBUG_SET(argument ? argument : Options::default_dbug_option); + DBUG_SET_INITIAL(argument ? argument : Options::default_dbug_option); +#endif + break; } return 0; } diff --git a/server-tools/instance-manager/options.h b/server-tools/instance-manager/options.h index abb094eac93..06818288606 100644 --- a/server-tools/instance-manager/options.h +++ b/server-tools/instance-manager/options.h @@ -51,6 +51,10 @@ struct Options /* argv pointer returned by load_defaults() to be used by free_defaults() */ static char **saved_argv; +#ifndef DBUG_OFF + static const char *default_dbug_option; +#endif + int load(int argc, char **argv); void cleanup(); #ifdef __WIN__ |