mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-28 00:21:56 +00:00
fix things looking for hardcoded mysqlbinlog path (t/pt-table-checksum/replication_filters.t and t/pt-table-sync/traces.t)
This commit is contained in:
@@ -271,8 +271,15 @@ $master_dbh = $sb->get_dbh_for('master');
|
|||||||
$row = $master_dbh->selectrow_hashref('show master status');
|
$row = $master_dbh->selectrow_hashref('show master status');
|
||||||
|
|
||||||
pt_table_checksum::main(@args, qw(--quiet));
|
pt_table_checksum::main(@args, qw(--quiet));
|
||||||
|
my $mysqlbinlog = `which mysqlbinlog`;
|
||||||
|
if ( $mysqlbinlog ) {
|
||||||
|
chomp $mysqlbinlog;
|
||||||
|
}
|
||||||
|
elsif ( -x "$ENV{PERCONA_TOOLKIT_SANDBOX}/bin/mysqlbinlog" ) {
|
||||||
|
$mysqlbinlog = "$ENV{PERCONA_TOOLKIT_SANDBOX}/bin/mysqlbinlog";
|
||||||
|
}
|
||||||
|
|
||||||
$output = `$ENV{PERCONA_TOOLKIT_SANDBOX}/bin/mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning' | sort -u`;
|
$output = `$mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning' | sort -u`;
|
||||||
|
|
||||||
is(
|
is(
|
||||||
$output,
|
$output,
|
||||||
@@ -289,7 +296,7 @@ $row = $master_dbh->selectrow_hashref('show master status');
|
|||||||
|
|
||||||
pt_table_checksum::main(@args, qw(--quiet --replicate-database percona));
|
pt_table_checksum::main(@args, qw(--quiet --replicate-database percona));
|
||||||
|
|
||||||
$output = `$ENV{PERCONA_TOOLKIT_SANDBOX}/bin/mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning'`;
|
$output = `$mysqlbinlog /tmp/12345/data/$row->{file} --start-position=$row->{position} | grep 'use ' | grep -v '^# Warning'`;
|
||||||
is(
|
is(
|
||||||
$output,
|
$output,
|
||||||
"use percona/*!*/;
|
"use percona/*!*/;
|
||||||
|
@@ -25,7 +25,12 @@ my $master_dbh = $sb->get_dbh_for('master');
|
|||||||
my $slave_dbh = $sb->get_dbh_for('slave1');
|
my $slave_dbh = $sb->get_dbh_for('slave1');
|
||||||
|
|
||||||
my $mysqlbinlog = `which mysqlbinlog`;
|
my $mysqlbinlog = `which mysqlbinlog`;
|
||||||
chomp $mysqlbinlog if $mysqlbinlog;
|
if ( $mysqlbinlog ) {
|
||||||
|
chomp $mysqlbinlog;
|
||||||
|
}
|
||||||
|
elsif ( -x "$ENV{PERCONA_TOOLKIT_SANDBOX}/bin/mysqlbinlog" ) {
|
||||||
|
$mysqlbinlog = "$ENV{PERCONA_TOOLKIT_SANDBOX}/bin/mysqlbinlog";
|
||||||
|
}
|
||||||
|
|
||||||
if ( !$master_dbh ) {
|
if ( !$master_dbh ) {
|
||||||
plan skip_all => 'Cannot connect to sandbox master';
|
plan skip_all => 'Cannot connect to sandbox master';
|
||||||
|
Reference in New Issue
Block a user