LOAD DATA LOCAL INFILE: The hopefully final fix.

This introduces a L option to the DSNs of pt-upgrade and pt-archiver,
which turns on mysql_local_infile.
This commit is contained in:
Brian Fraser fraserb@gmail.com
2012-10-17 19:19:44 -03:00
parent a433fa7d1c
commit 9e832790f8
11 changed files with 91 additions and 23 deletions

View File

@@ -30,7 +30,7 @@ elsif ( !$dbh2 ) {
plan skip_all => 'Cannot connect to second sandbox master';
}
my @host_args = ('h=127.1,P=12345', 'P=12348');
my @host_args = ('h=127.1,P=12345,L=1', 'P=12348');
my @op_args = (qw(-u msandbox -p msandbox),
'--compare', 'results,warnings',
'--zero-query-times',
@@ -104,9 +104,6 @@ $sb->wipe_clean($dbh2);
# Issue 951: mk-upgrade "I need a db argument" error with
# compare-results-method=rows
# #############################################################################
SKIP: {
skip "LOAD DATA LOCAL INFILE is disabled", 4 unless $can_load_data;
$sb->load_file('master', "$sample/002/tables.sql");
$sb->load_file('master1', "$sample/002/tables.sql");
@@ -116,7 +113,7 @@ SKIP: {
ok(
no_diff(
sub { pt_upgrade::main(@op_args, "$log/002/no-db.log",
'h=127.1,P=12345,D=test', 'P=12348,D=test',
'h=127.1,P=12345,D=test,L=1', 'P=12348,D=test',
qw(--compare-results-method rows --temp-database test)) },
"$sample/002/report-01.txt",
),
@@ -130,7 +127,7 @@ SKIP: {
ok(
no_diff(
sub { pt_upgrade::main(@op_args, "$log/002/no-db.log",
'h=127.1,P=12345,D=test', 'P=12348,D=test',
'h=127.1,P=12345,D=test,L=1', 'P=12348,D=test',
qw(--compare-results-method rows --temp-database tmp_db)) },
"$sample/002/report-01.txt",
),
@@ -151,15 +148,11 @@ SKIP: {
$sb->wipe_clean($dbh1);
$sb->wipe_clean($dbh2);
}
# #############################################################################
# Bug 926598: DBD::mysql bug causes pt-upgrade to use wrong
# precision (M) and scale (D)
# #############################################################################
SKIP: {
skip "LOAD DATA LOCAL INFILE is disabled", 2 unless $can_load_data;
$sb->load_file('master', "$sample/003/tables.sql");
$sb->load_file('master1', "$sample/003/tables.sql");
@@ -181,7 +174,6 @@ SKIP: {
qr/[`"]SUM\(total\)[`"]\s+double\sDEFAULT/i,
"No M,D in table def (bug 926598)"
);
}
# #############################################################################
# Done.

View File

@@ -36,7 +36,7 @@ $sb->load_file('master', 't/pt-upgrade/samples/001/tables.sql');
$sb->load_file('master1', 't/pt-upgrade/samples/001/tables.sql');
my $output;
my $cmd = "$trunk/bin/pt-upgrade h=127.1,P=12345,u=msandbox,p=msandbox P=12348 --compare results,warnings --zero-query-times --compare-results-method rows --limit 10";
my $cmd = "$trunk/bin/pt-upgrade h=127.1,P=12345,u=msandbox,p=msandbox,L=1 P=12348 --compare results,warnings --zero-query-times --compare-results-method rows --limit 10";
# This test really deals with,
# http://code.google.com/p/maatkit/issues/detail?id=754