summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-05-22 21:07:23 +0300
committerunknown <monty@hundin.mysql.fi>2002-05-22 21:07:23 +0300
commit45fd66ba47f6b842891c1361e92f21fdc3e17f80 (patch)
tree059d623eb234e471a753209af660bdbe306f57e6 /client
parent04aabfc28667606beeff970008e805b3029bfa76 (diff)
downloadmariadb-git-45fd66ba47f6b842891c1361e92f21fdc3e17f80.tar.gz
Portability fixes
Fixed problem with --password in mysql client/mysql.cc: Fixed problem with --password in mysql mysql-test/r/type_decimal.result: Portability fix mysql-test/t/type_decimal.test: Portability fix
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc23
1 files changed, 10 insertions, 13 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 6cde23a2a2f..1a0b4dffb05 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -664,21 +664,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break;
case 'p':
if (argument == disabled_my_option)
- opt_password= (char*) "";
- else
+ argument= (char*) ""; // Don't require password
+ if (argument)
{
- if (argument)
- {
- char *start= argument;
- my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
- opt_password= my_strdup(argument, MYF(MY_FAE));
- while (*argument) *argument++= 'x'; // Destroy argument
- if (*start)
- start[1]=0 ;
- }
- else
- tty_password= 1;
+ char *start= argument;
+ my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
+ opt_password= my_strdup(argument, MYF(MY_FAE));
+ while (*argument) *argument++= 'x'; // Destroy argument
+ if (*start)
+ start[1]=0 ;
}
+ else
+ tty_password= 1;
break;
case '#':
DBUG_PUSH(argument ? argument : default_dbug_option);