Merged fix-821715-enable-local-infile-in-dsn

This commit is contained in:
Brian Fraser
2012-10-30 22:12:57 -03:00
14 changed files with 130 additions and 45 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',
@@ -61,9 +61,6 @@ ok(
'Report for multiple queries (checksum method)'
);
SKIP: {
skip "LOAD DATA LOCAL INFILE is disabled", 2 unless $can_load_data;
ok(
no_diff(
sub { pt_upgrade::main(@args, "$trunk/$sample/001/select-one.log",
@@ -81,7 +78,6 @@ SKIP: {
),
'Report for multiple queries (rows method)'
);
}
ok(
no_diff(
@@ -108,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");
@@ -120,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",
),
@@ -134,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",
),
@@ -155,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");
@@ -185,7 +174,6 @@ SKIP: {
qr/[`"]SUM\(total\)[`"]\s+double\sDEFAULT/i,
"No M,D in table def (bug 926598)"
);
}
# #############################################################################
# SELECT FUNC(), so there are no tables.

View File

@@ -15,13 +15,6 @@ use PerconaTest;
use Sandbox;
require "$trunk/bin/pt-upgrade";
# This test calls pt-upgrade with --compare-results-method rows
# which use LOAD DATA LOCAL INFILE. If LOAD DATA is disabled,
# then this this test can't run.
if ( !$can_load_data ) {
plan skip_all => 'LOAD DATA LOCAL INFILE is disabled';
}
# This runs immediately if the server is already running, else it starts it.
diag(`$trunk/sandbox/start-sandbox master 12348 >/dev/null`);
@@ -43,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