diff options
author | sasha@mysql.sashanet.com <> | 2002-04-04 21:36:24 -0700 |
---|---|---|
committer | sasha@mysql.sashanet.com <> | 2002-04-04 21:36:24 -0700 |
commit | 48af52bfc4c17a239b867797e388cdf0d6b268ee (patch) | |
tree | cd1f33221edcbd7a6559cd1313770edad85c84d2 /client/mysqladmin.c | |
parent | 34998c5ad4ad6b1a3366d56b104fd3e6fe29e4a8 (diff) | |
download | mariadb-git-48af52bfc4c17a239b867797e388cdf0d6b268ee.tar.gz |
fixes to make it compile and pass the test suite again after the last
accidental push of broken code.
Diffstat (limited to 'client/mysqladmin.c')
-rw-r--r-- | client/mysqladmin.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/mysqladmin.c b/client/mysqladmin.c index c5f8d653d82..7f6d1d1a85d 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -253,10 +253,16 @@ int main(int argc,char *argv[]) int error, ho_error; MYSQL mysql; char **commands; + char** save_argv; MY_INIT(argv[0]); mysql_init(&mysql); load_defaults("my",load_default_groups,&argc,&argv); - + save_argv = argv; + /* Sasha: with the change to handle_options() we now need to do this fix + with save_argv in all client utilities. The problem is that + handle_options may modify argv, and that wreaks havoc with + free_defaults() + */ if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option))) { printf("%s: handle_options() failed with error %d\n", my_progname, @@ -327,7 +333,7 @@ int main(int argc,char *argv[]) } my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR)); my_free(user,MYF(MY_ALLOW_ZERO_PTR)); - free_defaults(argv); + free_defaults(save_argv); my_end(0); exit(error ? 1 : 0); return 0; |