mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
MDEV-31611: mariadb-setpermission - Can't use string as an ARRAY ref while strict refs in use
Reviewer: <>
This commit is contained in:
committed by
Daniel Black
parent
78c9a12c8f
commit
dd62a285b8
@@ -68,7 +68,7 @@ usage() if ($opt_help); # the help function
|
|||||||
|
|
||||||
if ($opt_host =~ s/:(\d+)$//)
|
if ($opt_host =~ s/:(\d+)$//)
|
||||||
{
|
{
|
||||||
$opt_port = $1;
|
$opt_port = $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($opt_host eq '')
|
if ($opt_host eq '')
|
||||||
@@ -98,7 +98,7 @@ my $prefix= 'mysql';
|
|||||||
if (eval {DBI->install_driver("MariaDB")}) {
|
if (eval {DBI->install_driver("MariaDB")}) {
|
||||||
$dsn ="DBI:MariaDB:;";
|
$dsn ="DBI:MariaDB:;";
|
||||||
$prefix= 'mariadb';
|
$prefix= 'mariadb';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dsn = "DBI:mysql:;";
|
$dsn = "DBI:mysql:;";
|
||||||
}
|
}
|
||||||
@@ -226,11 +226,11 @@ sub setpwd
|
|||||||
{
|
{
|
||||||
$pass = "PASSWORD(". $dbh->quote($pass) . ")";
|
$pass = "PASSWORD(". $dbh->quote($pass) . ")";
|
||||||
}
|
}
|
||||||
my $uh= "$user@$host";
|
my $uh= $user."@".$host;
|
||||||
my $sth = $dbh->prepare("set password for $uh =$pass") || die $dbh->errstr;
|
my $sth = $dbh->prepare("set password for $uh =$pass") || die $dbh->errstr;
|
||||||
$sth->execute || die $dbh->errstr;
|
$sth->execute || die $dbh->errstr;
|
||||||
$sth->finish;
|
$sth->finish;
|
||||||
print "The password is set for user $user.\n\n";
|
print "The password is set for user $uh.\n\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user