mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-17 01:01:39 +08:00
Merged fix-821715-enable-local-infile-in-dsn
This commit is contained in:
@@ -184,7 +184,6 @@ ok(
|
||||
# Bug 903387: pt-archiver doesn't honor b=1 flag to create SQL_LOG_BIN statement
|
||||
# #############################################################################
|
||||
SKIP: {
|
||||
skip('LOAD DATA LOCAL INFILE is disabled', 3) if !$can_load_data;
|
||||
$sb->load_file('master', "t/pt-archiver/samples/bulk_regular_insert.sql");
|
||||
$sb->wait_for_slaves();
|
||||
|
||||
|
||||
@@ -22,9 +22,6 @@ my $dbh = $sb->get_dbh_for('master');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
}
|
||||
elsif ( !$can_load_data ) {
|
||||
plan skip_all => 'LOAD DATA LOCAL INFILE is disabled';
|
||||
}
|
||||
|
||||
my $output;
|
||||
my $rows;
|
||||
@@ -41,7 +38,7 @@ $dbh->do('INSERT INTO `test`.`table_5_copy` SELECT * FROM `test`.`table_5`');
|
||||
$output = output(
|
||||
sub { pt_archiver::main(qw(--no-ascend --limit 50 --bulk-insert),
|
||||
qw(--bulk-delete --where 1=1 --statistics),
|
||||
'--source', "D=test,t=table_5,F=$cnf",
|
||||
'--source', "L=1,D=test,t=table_5,F=$cnf",
|
||||
'--dest', "t=table_5_dest") },
|
||||
);
|
||||
like($output, qr/SELECT 105/, 'Fetched 105 rows');
|
||||
@@ -66,7 +63,7 @@ $output = output(
|
||||
sub { pt_archiver::main(
|
||||
'--where', "id < 8", qw(--limit 100000 --txn-size 1000),
|
||||
qw(--why-quit --statistics --bulk-insert),
|
||||
'--source', "D=bri,t=t,F=$cnf",
|
||||
'--source', "L=1,D=bri,t=t,F=$cnf",
|
||||
'--dest', "t=t_arch") },
|
||||
);
|
||||
$rows = $dbh->selectall_arrayref('select id from bri.t order by id');
|
||||
|
||||
@@ -22,9 +22,6 @@ my $dbh = $sb->get_dbh_for('master');
|
||||
if ( !$dbh ) {
|
||||
plan skip_all => 'Cannot connect to sandbox master';
|
||||
}
|
||||
elsif ( !$can_load_data ) {
|
||||
plan skip_all => 'LOAD DATA LOCAL INFILE is disabled';
|
||||
}
|
||||
|
||||
my $output;
|
||||
my $cnf = "/tmp/12345/my.sandbox.cnf";
|
||||
@@ -39,7 +36,7 @@ $sb->load_file('master', "t/pt-archiver/samples/bulk_regular_insert.sql");
|
||||
$dbh->do('use bri');
|
||||
|
||||
output(
|
||||
sub { pt_archiver::main("--source", "F=$cnf,D=bri,t=t", qw(--dest t=t_arch --where 1=1 --bulk-insert --limit 3)) },
|
||||
sub { pt_archiver::main("--source", "F=$cnf,D=bri,t=t,L=1", qw(--dest t=t_arch --where 1=1 --bulk-insert --limit 3)) },
|
||||
);
|
||||
|
||||
my $t_rows = $dbh->selectall_arrayref('select * from t order by id');
|
||||
@@ -73,7 +70,7 @@ is_deeply(
|
||||
$sb->load_file('master', "t/pt-archiver/samples/bulk_regular_insert.sql");
|
||||
$dbh->do('use bri');
|
||||
|
||||
`$cmd --source F=$cnf,D=bri,t=t --dest t=t_arch,m=bulk_regular_insert --where "1=1" --bulk-insert --limit 3`;
|
||||
`$cmd --source F=$cnf,D=bri,t=t,L=1 --dest t=t_arch,m=bulk_regular_insert --where "1=1" --bulk-insert --limit 3`;
|
||||
|
||||
my $bri_t_rows = $dbh->selectall_arrayref('select * from t order by id');
|
||||
my $bri_t_arch_rows = $dbh->selectall_arrayref('select * from t_arch order by id');
|
||||
|
||||
Reference in New Issue
Block a user