mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 11:57:38 +02:00
fixes to make it compile and pass the test suite again after the last
accidental push of broken code. client/mysqladmin.c: fixed crash in free_defaults() libmysql/Makefile.shared: added my_getopt to libmysqlclient mysys/my_getopt.c: fixed bug in parsing -O var=val
This commit is contained in:
parent
36701f1840
commit
91c373fc72
3 changed files with 17 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue