mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 23:45:44 +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:
@@ -3955,24 +3955,8 @@ sub main {
|
||||
$dp->get_cxn_params($table), { AutoCommit => $ac });
|
||||
PTDEBUG && _d('Inspecting table on', $dp->as_string($table));
|
||||
|
||||
if ( $o->get('bulk-insert') ) {
|
||||
local $@;
|
||||
my $sql = "LOAD DATA LOCAL INFILE '/dev/null' INTO TABLE "
|
||||
. "`test`.`pt_not_there`";
|
||||
eval { $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();
|
||||
die("--bulk-insert cannot work as LOAD DATA LOCAL INFILE "
|
||||
. "is disabled. See http://kb.percona.com/troubleshoot-load-data-infile"
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
# Set options that can enable removing data on the master and archiving it
|
||||
# on the slaves.
|
||||
# Set options that can enable removing data on the master
|
||||
# and archiving it on the slaves.
|
||||
if ( $table->{a} ) {
|
||||
$dbh->do("USE $table->{a}");
|
||||
}
|
||||
|
Reference in New Issue
Block a user