Removed the L option from the dsn_opts exported by PerconaTest, as it was useless and breaking tests, and added an L=1 to a leftover pt-archiver --bulk-insert call

This commit is contained in:
Brian Fraser
2012-11-07 08:54:39 -03:00
parent 86de49e727
commit bb47e4cdcc
4 changed files with 7 additions and 10 deletions

View File

@@ -138,12 +138,6 @@ our $dsn_opts = [
dsn => 'user', dsn => 'user',
copy => 1, copy => 1,
}, },
{
key => 'L',
desc => 'Pass mysql_local_infile to DBD::mysql',
dsn => 'mysql_local_infile',
copy => 1,
},
]; ];
# Runs code, captures and returns its output. # Runs code, captures and returns its output.

View File

@@ -218,7 +218,7 @@ is_deeply (
{ S => 'bar', h => 'host' } )) { S => 'bar', h => 'host' } ))
], ],
[ [
'DBI:mysql:foo;host=me;mysql_socket=bar;mysql_read_default_group=client;mysql_local_infile=1', 'DBI:mysql:foo;host=me;mysql_socket=bar;mysql_read_default_group=client',
'a', 'a',
'b', 'b',
], ],
@@ -234,7 +234,7 @@ is_deeply (
{ S => 'bar', h => 'host' } )) { S => 'bar', h => 'host' } ))
], ],
[ [
'DBI:mysql:foo;host=me;mysql_socket=bar;charset=foo;mysql_read_default_group=client;mysql_local_infile=1', 'DBI:mysql:foo;host=me;mysql_socket=bar;charset=foo;mysql_read_default_group=client',
'a', 'a',
'b', 'b',
], ],
@@ -577,6 +577,7 @@ $dp->prop('set-vars', undef);
SKIP: { SKIP: {
skip "LOAD DATA LOCAL INFILE already works here", 1 if $can_load_data; skip "LOAD DATA LOCAL INFILE already works here", 1 if $can_load_data;
local $dsn->{L} = 1;
my $dbh = $dp->get_dbh( $dp->get_cxn_params( $dsn ) ); my $dbh = $dp->get_dbh( $dp->get_cxn_params( $dsn ) );
use File::Temp qw(tempfile); use File::Temp qw(tempfile);
@@ -596,7 +597,7 @@ SKIP: {
is( is(
$EVAL_ERROR, $EVAL_ERROR,
'', '',
"Even though LOCAL INFILE is off by default, the dbhs returned by DSNParser can use it" "Even though LOCAL INFILE is off by default, the dbhs returned by DSNParser can use it if L => 1"
); );
unlink $filename; unlink $filename;

View File

@@ -1745,6 +1745,7 @@ is_deeply(
p => 'foo', p => 'foo',
t => undef, t => undef,
u => 'bob', u => 'bob',
L => undef,
}, },
'DSN opt gets missing vals from --host, --port, etc. (issue 248)', 'DSN opt gets missing vals from --host, --port, etc. (issue 248)',
); );
@@ -1774,6 +1775,7 @@ is_deeply(
p => undef, p => undef,
t => undef, t => undef,
u => 'bob', u => 'bob',
L => undef,
}, },
'Vals from "defaults to" DSN take precedence over defaults (issue 248)' 'Vals from "defaults to" DSN take precedence over defaults (issue 248)'
); );

View File

@@ -207,7 +207,7 @@ SKIP: {
$output = output( $output = output(
sub { pt_archiver::main( sub { pt_archiver::main(
'--source', "D=bri,t=t,F=$cnf,b=1", '--source', "D=bri,L=1,t=t,F=$cnf,b=1",
'--dest', "D=bri,t=t_arch", '--dest', "D=bri,t=t_arch",
qw(--where 1=1 --replace --commit-each --bulk-insert --bulk-delete), qw(--where 1=1 --replace --commit-each --bulk-insert --bulk-delete),
qw(--limit 10)) }, qw(--limit 10)) },