MDEV-7883 Segmentation failure when running mysqladmin -u root -p
take into account that argc can be 0 (if there were no commands on the command line)
This commit is contained in:
parent
18215dd9fa
commit
053143efe1
@ -1198,6 +1198,9 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
static char **mask_password(int argc, char ***argv)
|
||||
{
|
||||
char **temp_argv;
|
||||
if (!argc)
|
||||
return NULL;
|
||||
|
||||
temp_argv= (char **)(my_malloc(sizeof(char *) * argc, MYF(MY_WME)));
|
||||
argc--;
|
||||
while (argc > 0)
|
||||
|
@ -45,3 +45,9 @@ EOF
|
||||
--exec $MYSQLADMIN --defaults-extra-file=$MYSQLTEST_VARDIR/tmp/cnf_file -uroot -S $MASTER_MYSOCK -P $MASTER_MYPORT ping 2>&1
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/cnf_file
|
||||
|
||||
#
|
||||
# MDEV-7883 Segmentation failure when running mysqladmin -u root -p
|
||||
#
|
||||
--error 1
|
||||
--exec $MYSQLADMIN -u root -p 2>&1 > /dev/null
|
||||
|
Loading…
x
Reference in New Issue
Block a user