summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc6
-rw-r--r--client/mysql_upgrade.c3
-rw-r--r--client/mysqladmin.cc3
-rw-r--r--client/mysqlbinlog.cc3
-rw-r--r--client/mysqlcheck.c5
-rw-r--r--client/mysqldump.c3
-rw-r--r--client/mysqlimport.c3
-rw-r--r--client/mysqlshow.c4
-rw-r--r--client/mysqlslap.c6
-rw-r--r--client/mysqltest.cc4
10 files changed, 28 insertions, 12 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index ca0584df0cd..5e3260e486b 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1122,7 +1122,11 @@ int main(int argc,char *argv[])
close(stdout_fileno_copy); /* Clean up dup(). */
}
- load_defaults("my",load_default_groups,&argc,&argv);
+ if (load_defaults("my",load_default_groups,&argc,&argv))
+ {
+ my_end(0);
+ exit(1);
+ }
defaults_argv=argv;
if (get_options(argc, (char **) argv))
{
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 05eb80e5455..1a3f61559d6 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -819,7 +819,8 @@ int main(int argc, char **argv)
init_dynamic_string(&conn_args, "", 512, 256))
die("Out of memory");
- load_defaults("my", load_default_groups, &argc, &argv);
+ if (load_defaults("my", load_default_groups, &argc, &argv))
+ die(NULL);
defaults_argv= argv; /* Must be freed by 'free_defaults' */
if (handle_options(&argc, &argv, my_long_options, get_one_option))
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index 808919fbd0c..2c4a20f2786 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -304,7 +304,8 @@ int main(int argc,char *argv[])
MY_INIT(argv[0]);
mysql_init(&mysql);
- load_defaults("my",load_default_groups,&argc,&argv);
+ if (load_defaults("my",load_default_groups,&argc,&argv))
+ exit(1);
save_argv = argv; /* Save for free_defaults */
if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option)))
{
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 874b5a3d77a..1fb56fae076 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -2031,7 +2031,8 @@ int main(int argc, char** argv)
my_init_time(); // for time functions
- load_defaults("my", load_default_groups, &argc, &argv);
+ if (load_defaults("my", load_default_groups, &argc, &argv))
+ exit(1);
defaults_argv= argv;
parse_args(&argc, (char***)&argv);
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 5c801eb6e26..980cfd9b3ea 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -344,9 +344,8 @@ static int get_options(int *argc, char ***argv)
exit(0);
}
- load_defaults("my", load_default_groups, argc, argv);
-
- if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
+ if ((ho_error= load_defaults("my", load_default_groups, argc, argv)) ||
+ (ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
exit(ho_error);
if (!what_to_do)
diff --git a/client/mysqldump.c b/client/mysqldump.c
index ebf0add4590..9920cfc1904 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -890,7 +890,8 @@ static int get_options(int *argc, char ***argv)
opt_net_buffer_length= *mysql_params->p_net_buffer_length;
md_result_file= stdout;
- load_defaults("my",load_default_groups,argc,argv);
+ if (load_defaults("my",load_default_groups,argc,argv))
+ return 1;
defaults_argv= *argv;
if (my_hash_init(&ignore_table, charset_info, 16, 0, 0,
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index 969cff929d2..f8432c95548 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -592,7 +592,8 @@ int main(int argc, char **argv)
char **argv_to_free;
MY_INIT(argv[0]);
- load_defaults("my",load_default_groups,&argc,&argv);
+ if (load_defaults("my",load_default_groups,&argc,&argv))
+ return 1;
/* argv is changed in the program */
argv_to_free= argv;
if (get_options(&argc, &argv))
diff --git a/client/mysqlshow.c b/client/mysqlshow.c
index 206b86d07cf..588ee049546 100644
--- a/client/mysqlshow.c
+++ b/client/mysqlshow.c
@@ -63,7 +63,9 @@ int main(int argc, char **argv)
char *wild;
MYSQL mysql;
MY_INIT(argv[0]);
- load_defaults("my",load_default_groups,&argc,&argv);
+ if (load_defaults("my",load_default_groups,&argc,&argv))
+ exit(1);
+
get_options(&argc,&argv);
wild=0;
diff --git a/client/mysqlslap.c b/client/mysqlslap.c
index 21b40824be7..6ff2a868a21 100644
--- a/client/mysqlslap.c
+++ b/client/mysqlslap.c
@@ -299,7 +299,11 @@ int main(int argc, char **argv)
MY_INIT(argv[0]);
- load_defaults("my",load_default_groups,&argc,&argv);
+ if (load_defaults("my",load_default_groups,&argc,&argv))
+ {
+ my_end(0);
+ exit(1);
+ }
defaults_argv=argv;
if (get_options(&argc,&argv))
{
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 67cba774008..bd727616a43 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -6034,7 +6034,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int parse_args(int argc, char **argv)
{
- load_defaults("my",load_default_groups,&argc,&argv);
+ if (load_defaults("my",load_default_groups,&argc,&argv))
+ exit(1);
+
default_argv= argv;
if ((handle_options(&argc, &argv, my_long_options, get_one_option)))