Commit 6280e26c authored by Jim Winstead's avatar Jim Winstead

Various command-line utilities, including mysqlbinlog and mysqldump, don't

handle the --skip-password option correctly. (Bug #28479)
parent 5b66e5fe
...@@ -231,6 +231,8 @@ get_one_option(int optid, const struct my_option *opt, ...@@ -231,6 +231,8 @@ get_one_option(int optid, const struct my_option *opt,
break; break;
case 'p': case 'p':
if (argument == disabled_my_option)
argument= (char*) ""; // Don't require password
tty_password= 1; tty_password= 1;
add_option= FALSE; add_option= FALSE;
if (argument) if (argument)
......
...@@ -232,6 +232,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -232,6 +232,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
opt_count_iterations= 1; opt_count_iterations= 1;
break; break;
case 'p': case 'p':
if (argument == disabled_my_option)
argument= (char*) ""; // Don't require password
if (argument) if (argument)
{ {
char *start=argument; char *start=argument;
......
...@@ -1226,6 +1226,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -1226,6 +1226,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
one_database = 1; one_database = 1;
break; break;
case 'p': case 'p':
if (argument == disabled_my_option)
argument= (char*) ""; // Don't require password
if (argument) if (argument)
{ {
my_free(pass,MYF(MY_ALLOW_ZERO_PTR)); my_free(pass,MYF(MY_ALLOW_ZERO_PTR));
......
...@@ -286,6 +286,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -286,6 +286,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
what_to_do= DO_UPGRADE; what_to_do= DO_UPGRADE;
break; break;
case 'p': case 'p':
if (argument == disabled_my_option)
argument= (char*) ""; // Don't require password
if (argument) if (argument)
{ {
char *start = argument; char *start = argument;
......
...@@ -702,6 +702,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -702,6 +702,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break; break;
#endif #endif
case 'p': case 'p':
if (argument == disabled_my_option)
argument= (char*) ""; // Don't require password
if (argument) if (argument)
{ {
char *start=argument; char *start=argument;
......
...@@ -221,6 +221,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -221,6 +221,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break; break;
#endif #endif
case 'p': case 'p':
if (argument == disabled_my_option)
argument= (char*) ""; // Don't require password
if (argument) if (argument)
{ {
char *start=argument; char *start=argument;
......
...@@ -281,6 +281,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -281,6 +281,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
opt_verbose++; opt_verbose++;
break; break;
case 'p': case 'p':
if (argument == disabled_my_option)
argument= (char*) ""; // Don't require password
if (argument) if (argument)
{ {
char *start=argument; char *start=argument;
......
...@@ -712,6 +712,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -712,6 +712,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
verbose++; verbose++;
break; break;
case 'p': case 'p':
if (argument == disabled_my_option)
argument= (char*) ""; // Don't require password
if (argument) if (argument)
{ {
char *start= argument; char *start= argument;
......
...@@ -5803,6 +5803,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -5803,6 +5803,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break; break;
} }
case 'p': case 'p':
if (argument == disabled_my_option)
argument= (char*) ""; // Don't require password
if (argument) if (argument)
{ {
my_free(opt_pass, MYF(MY_ALLOW_ZERO_PTR)); my_free(opt_pass, MYF(MY_ALLOW_ZERO_PTR));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment