summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2005-02-19 19:51:47 +0200
committerunknown <Sinisa@sinisa.nasamreza.org>2005-02-19 19:51:47 +0200
commit97e6e780063e464b7ec1ec2b8204fb3ec3831a20 (patch)
treeb399ba0fe3d56450c53d8fcf218fa501b82c02d6 /extra
parentac57068a7b75b4ff6117fad8cc10b11e4f3bc4cd (diff)
downloadmariadb-git-97e6e780063e464b7ec1ec2b8204fb3ec3831a20.tar.gz
fix for a bug with my_print_defaults with --defaults-extra-file= option
Diffstat (limited to 'extra')
-rw-r--r--extra/my_print_defaults.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c
index 2ec6f8b406f..d5836cb0dc8 100644
--- a/extra/my_print_defaults.c
+++ b/extra/my_print_defaults.c
@@ -120,25 +120,33 @@ int main(int argc, char **argv)
int count, error;
char **load_default_groups, *tmp_arguments[2],
**argument, **arguments;
+ char *defaults, *extra_defaults;
MY_INIT(argv[0]);
+ get_defaults_files(argc, argv, &defaults, &extra_defaults);
+
/*
** Check out the args
*/
- if (get_options(&argc,&argv))
- exit(1);
if (!(load_default_groups=(char**) my_malloc((argc+2)*sizeof(char*),
MYF(MY_WME))))
exit(1);
+ if (get_options(&argc,&argv))
+ exit(1);
for (count=0; *argv ; argv++,count++)
load_default_groups[count]= *argv;
load_default_groups[count]=0;
- count=1;
+ count=0;
arguments=tmp_arguments;
- arguments[0]=my_progname;
- arguments[1]=0;
+ arguments[count++]=my_progname;
+ if (extra_defaults)
+ arguments[count++]= extra_defaults;
+ if (defaults)
+ arguments[count++]= defaults;
+ arguments[count]= 0;
+
if ((error= load_defaults(config_file, (const char **) load_default_groups,
&count, &arguments)))
{