summaryrefslogtreecommitdiff
path: root/server-tools/instance-manager/options.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server-tools/instance-manager/options.cc')
-rw-r--r--server-tools/instance-manager/options.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/server-tools/instance-manager/options.cc b/server-tools/instance-manager/options.cc
index b16fcabae01..8119e8fc0ea 100644
--- a/server-tools/instance-manager/options.cc
+++ b/server-tools/instance-manager/options.cc
@@ -55,6 +55,8 @@ uint Options::monitoring_interval= DEFAULT_MONITORING_INTERVAL;
uint Options::port_number= DEFAULT_PORT;
/* just to declare */
char **Options::saved_argv= NULL;
+/* Remember if the config file was forced */
+bool Options::is_forced_default_file= 0;
/*
List of options, accepted by the instance manager.
@@ -118,7 +120,7 @@ static struct my_option my_long_options[] =
" Server binary.",
(gptr *) &Options::default_mysqld_path,
(gptr *) &Options::default_mysqld_path,
- 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+ 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0 },
{ "monitoring-interval", OPT_MONITORING_INTERVAL, "Interval to monitor"
" instances in seconds.",
@@ -254,6 +256,7 @@ int Options::load(int argc, char **argv)
if (is_prefix(argv[1], "--defaults-file="))
{
Options::config_file= strchr(argv[1], '=') + 1;
+ Options::is_forced_default_file= 1;
}
if (is_prefix(argv[1], "--defaults-extra-file=") ||
is_prefix(argv[1], "--no-defaults"))