Skip to content
Permalink
Browse files
MDEV-25878: mytop bugs: check for mysql driver and sockets
mytop fall-back to DBD::mysql if DBD::MariaDB is not available

Apply #1546
  • Loading branch information
jb-boin authored and an3l committed Jun 21, 2021
1 parent c3a1ba0 commit 59e3ac2
Showing 1 changed file with 6 additions and 2 deletions.
@@ -242,7 +242,11 @@ my $dsn;

## Socket takes precedence.

$dsn ="DBI:MariaDB:database=$config{db};mariadb_read_default_group=mytop;";
if (eval {DBI->install_driver("MariaDB")}) {
$dsn = "DBI:MariaDB:database=$config{db};mariadb_read_default_group=mytop;";
} else {
$dsn = "DBI:mysql:database=$config{db};mysql_read_default_group=mytop;";
}

if ($config{socket} and -S $config{socket})
{
@@ -2095,7 +2099,7 @@ following:
* Perl 5.005 or newer
* Getopt::Long
* DBI and DBD::MariaDB
* DBI and DBD::MariaDB or DBD::mysql
* Term::ReadKey from CPAN
Most systems are likely to have all of those installed--except for

0 comments on commit 59e3ac2

Please sign in to comment.