diff options
author | Jim Winstead <jimw@mysql.com> | 2009-05-07 10:51:55 -0700 |
---|---|---|
committer | Jim Winstead <jimw@mysql.com> | 2009-05-07 10:51:55 -0700 |
commit | 038be08a1b8f29479e6ff993328692d0875650c2 (patch) | |
tree | 200797b66edec0ae022b4848a8d58a51e289216d | |
parent | b78f9a8659adf3be4ecbad3db59a97deff4f2193 (diff) | |
download | mariadb-git-038be08a1b8f29479e6ff993328692d0875650c2.tar.gz |
Various command-line utilities, including mysqlbinlog and mysqldump, don't
handle the --skip-password option correctly. (Bug #28479)
-rw-r--r-- | client/mysql_upgrade.c | 2 | ||||
-rw-r--r-- | client/mysqladmin.cc | 2 | ||||
-rw-r--r-- | client/mysqlbinlog.cc | 2 | ||||
-rw-r--r-- | client/mysqlcheck.c | 2 | ||||
-rw-r--r-- | client/mysqldump.c | 2 | ||||
-rw-r--r-- | client/mysqlimport.c | 2 | ||||
-rw-r--r-- | client/mysqlshow.c | 2 | ||||
-rw-r--r-- | client/mysqlslap.c | 2 | ||||
-rw-r--r-- | client/mysqltest.cc | 2 |
9 files changed, 18 insertions, 0 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index c50f7e03c27..cbc60d8acad 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -231,6 +231,8 @@ get_one_option(int optid, const struct my_option *opt, break; case 'p': + if (argument == disabled_my_option) + argument= (char*) ""; // Don't require password tty_password= 1; add_option= FALSE; if (argument) diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index df0dc1e7049..94d3d92e03a 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -232,6 +232,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), opt_count_iterations= 1; break; case 'p': + if (argument == disabled_my_option) + argument= (char*) ""; // Don't require password if (argument) { char *start=argument; diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 1621db5ded8..2c2023ae129 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -1226,6 +1226,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), one_database = 1; break; case 'p': + if (argument == disabled_my_option) + argument= (char*) ""; // Don't require password if (argument) { my_free(pass,MYF(MY_ALLOW_ZERO_PTR)); diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index d2edd084c57..1bdb28f5a11 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -286,6 +286,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), what_to_do= DO_UPGRADE; break; case 'p': + if (argument == disabled_my_option) + argument= (char*) ""; // Don't require password if (argument) { char *start = argument; diff --git a/client/mysqldump.c b/client/mysqldump.c index 44106388d69..323376dd8bf 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -702,6 +702,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; #endif case 'p': + if (argument == disabled_my_option) + argument= (char*) ""; // Don't require password if (argument) { char *start=argument; diff --git a/client/mysqlimport.c b/client/mysqlimport.c index 09ba27b287a..ec418244f3d 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -221,6 +221,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; #endif case 'p': + if (argument == disabled_my_option) + argument= (char*) ""; // Don't require password if (argument) { char *start=argument; diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 0e696aed211..e401d6cad8f 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -281,6 +281,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), opt_verbose++; break; case 'p': + if (argument == disabled_my_option) + argument= (char*) ""; // Don't require password if (argument) { char *start=argument; diff --git a/client/mysqlslap.c b/client/mysqlslap.c index b8515289df5..4cf8c7204ed 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -712,6 +712,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), verbose++; break; case 'p': + if (argument == disabled_my_option) + argument= (char*) ""; // Don't require password if (argument) { char *start= argument; diff --git a/client/mysqltest.cc b/client/mysqltest.cc index fb6baa744b2..f29fd36aa27 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -5803,6 +5803,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; } case 'p': + if (argument == disabled_my_option) + argument= (char*) ""; // Don't require password if (argument) { my_free(opt_pass, MYF(MY_ALLOW_ZERO_PTR)); |