mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
Portability fixes
Fixed problem with --password in mysql
This commit is contained in:
parent
24b1874ad5
commit
c4a2d3d5d6
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;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
if (argument == disabled_my_option)
|
if (argument == disabled_my_option)
|
||||||
opt_password= (char*) "";
|
argument= (char*) ""; // Don't require password
|
||||||
else
|
if (argument)
|
||||||
{
|
{
|
||||||
if (argument)
|
char *start= argument;
|
||||||
{
|
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
|
||||||
char *start= argument;
|
opt_password= my_strdup(argument, MYF(MY_FAE));
|
||||||
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
|
while (*argument) *argument++= 'x'; // Destroy argument
|
||||||
opt_password= my_strdup(argument, MYF(MY_FAE));
|
if (*start)
|
||||||
while (*argument) *argument++= 'x'; // Destroy argument
|
start[1]=0 ;
|
||||||
if (*start)
|
|
||||||
start[1]=0 ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
tty_password= 1;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
tty_password= 1;
|
||||||
break;
|
break;
|
||||||
case '#':
|
case '#':
|
||||||
DBUG_PUSH(argument ? argument : default_dbug_option);
|
DBUG_PUSH(argument ? argument : default_dbug_option);
|
||||||
|
|
|
@ -232,7 +232,7 @@ a
|
||||||
99999999.99
|
99999999.99
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a decimal(10,2));
|
create table t1 (a decimal(10,2));
|
||||||
insert into t1 values (0.0),(-0.0),(+0.0),(01.0),(+01.0),(-01.0);
|
insert into t1 values (0.0),("-0.0"),(+0.0),(01.0),(+01.0),(-01.0);
|
||||||
insert into t1 values (-.1),(+.1),(.1);
|
insert into t1 values (-.1),(+.1),(.1);
|
||||||
insert into t1 values (00000000000001),(+0000000000001),(-0000000000001);
|
insert into t1 values (00000000000001),(+0000000000001),(-0000000000001);
|
||||||
insert into t1 values (+111111111.11),(111111111.11),(-11111111.11);
|
insert into t1 values (+111111111.11),(111111111.11),(-11111111.11);
|
||||||
|
|
|
@ -183,7 +183,8 @@ drop table t1;
|
||||||
|
|
||||||
|
|
||||||
create table t1 (a decimal(10,2));
|
create table t1 (a decimal(10,2));
|
||||||
insert into t1 values (0.0),(-0.0),(+0.0),(01.0),(+01.0),(-01.0);
|
# The -0.0 needs to be typed as not all platforms supports this
|
||||||
|
insert into t1 values (0.0),("-0.0"),(+0.0),(01.0),(+01.0),(-01.0);
|
||||||
insert into t1 values (-.1),(+.1),(.1);
|
insert into t1 values (-.1),(+.1),(.1);
|
||||||
insert into t1 values (00000000000001),(+0000000000001),(-0000000000001);
|
insert into t1 values (00000000000001),(+0000000000001),(-0000000000001);
|
||||||
insert into t1 values (+111111111.11),(111111111.11),(-11111111.11);
|
insert into t1 values (+111111111.11),(111111111.11),(-11111111.11);
|
||||||
|
|
Loading…
Add table
Reference in a new issue