mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 15:31:55 +00:00
Remove LOAD DATA check from pt-archiver and pt-upgrade. Make test-env check if LOAD DATA works and PerconaTest export . Rewrite how pt-archiver/t/bulk_insert.t conditionalizes on LOAD DATA working.
This commit is contained in:
@@ -10371,32 +10371,6 @@ sub main {
|
||||
$host->{name} = $name || 'unknown host';
|
||||
}
|
||||
|
||||
# ########################################################################
|
||||
# If we're comparing rows, check that LOAD DATA LOCAL INFILE works for,
|
||||
# all hosts, or bail out early if it doesn't.
|
||||
# ########################################################################
|
||||
my $compare = $o->get('compare');
|
||||
if ( $compare->{results}
|
||||
&& lc($o->get('compare-results-method')) eq 'rows' )
|
||||
{
|
||||
foreach my $host ( @$hosts ) {
|
||||
local $@;
|
||||
my $sql = "LOAD DATA LOCAL INFILE '/dev/null' INTO TABLE "
|
||||
. "`test`.`pt_not_there`";
|
||||
eval { $host->{dbh}->do($sql); 1 } or do {
|
||||
my $e = $@;
|
||||
my $error_re = qr/\QDBD::mysql::db do failed: The used command is not allowed with this MySQL version [for Statement "LOAD DATA LOCAL INFILE/;
|
||||
if ($e =~ $error_re) {
|
||||
$_->{dbh}->disconnect() for @$hosts;
|
||||
die("Cannot compare rows as LOAD DATA LOCAL INFILE "
|
||||
. "is disabled for $host->{name}. See "
|
||||
. "http://kb.percona.com/troubleshoot-load-data-infile"
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
# ########################################################################
|
||||
# Make some common modules.
|
||||
# ########################################################################
|
||||
@@ -10430,6 +10404,7 @@ sub main {
|
||||
# ########################################################################
|
||||
# Make compare modules in order.
|
||||
# ########################################################################
|
||||
my $compare = $o->get('compare');
|
||||
my @compare_modules;
|
||||
if ( $compare->{results} ) {
|
||||
my $method = lc $o->get('compare-results-method');
|
||||
|
Reference in New Issue
Block a user