1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Switch Perl DBI scripts from DBD::mysql to DBD::MariaDB driver

Perl DBD::MariaDB driver is available CPAN and is already used in
production environment.
This commit is contained in:
Pali
2019-06-07 16:30:27 +02:00
committed by Robert Bindar
parent 9a7d96e832
commit 5cc2096f93
35 changed files with 161 additions and 166 deletions

View File

@ -192,12 +192,12 @@ $opt{allowold} = 1 if $opt{keepold};
my $dsn;
$dsn = ";host=" . (defined($opt{host}) ? $opt{host} : "localhost");
$dsn .= ";port=$opt{port}" if $opt{port};
$dsn .= ";mysql_socket=$opt{socket}" if $opt{socket};
$dsn .= ";mariadb_socket=$opt{socket}" if $opt{socket};
# use mysql_read_default_group=mysqlhotcopy so that [client] and
# use mariadb_read_default_group=mysqlhotcopy so that [client] and
# [mysqlhotcopy] groups will be read from standard options files.
my $dbh = DBI->connect("dbi:mysql:$dsn;mysql_read_default_group=mysqlhotcopy",
my $dbh = DBI->connect("DBI:MariaDB:$dsn;mariadb_read_default_group=mysqlhotcopy",
$opt{user}, $opt{password},
{
RaiseError => 1,
@ -796,7 +796,7 @@ sub record_log_pos {
my $row_hash = get_row_hash( $dbh, "show slave status" );
my ($master_host, $log_file, $log_pos );
if ( $dbh->{mysql_serverinfo} =~ /^3\.23/ ) {
if ( $dbh->{mariadb_serverinfo} =~ /^3\.23/ ) {
($master_host, $log_file, $log_pos )
= @{$row_hash}{ qw / Master_Host Log_File Pos / };
} else {