Comment 3 for bug 1034170

Revision history for this message
Ryan Lowe (ryan-a-lowe) wrote : Re: --defaults-file is ignored for slave(s) in pt-table-checksum

Hi Daniel!

I just verified that DBD::mysql overrides the values in the defaults file if they're passed to it. Here's what I did on 10.0.0.1 (test1.lab).

%> cat /tmp/my.cnf
[client]

socket = /var/lib/mysql/mysql.sock
user = root
%> cat dbdtest.pl

#!/usr/bin/perl

use strict;
use warnings FATAL => 'all';
use DBI;

my $dbh = DBI->connect('DBI:mysql:test:10.0.0.2:3306;mysql_read_default_file=/tmp/my.cnf;mysql_read_default_group=client', 'testuser', 'testpass') || die "Could not connect to database: $DBI::errstr";
my $sth = $dbh->prepare('SELECT @@hostname AS val');
$sth->execute();
my $result = $sth->fetchrow_hashref();
$sth->finish;
print "Value returned: $result->{val}\n";
$dbh->disconnect()

%> perl dbdtest.pl
Value returned: test2.lab

So, if this is the only concern, we should be good to go?