mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
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
This commit is contained in:
parent
473aa13d6b
commit
a5c8c54f56
3 changed files with 13 additions and 15 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue