Don't use -pmsandbox because 5.6 mysql cli warns that it's not safe. Plus, /tmp/PORT/use already adds --defaults-file=/tmp/PORT/my.sandbox.cnf.

This commit is contained in:
Daniel Nichter
2012-12-01 11:17:18 -07:00
parent 11907bbbe8
commit 9b97298721
3 changed files with 7 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ my $cmd = "$trunk/bin/pt-kill -F $cnf -h 127.1";
# Shell out to a sleep(10) query and try to capture the query.
# Backticks don't work here.
system("/tmp/12345/use -h127.1 -P12345 -umsandbox -pmsandbox -e 'select sleep(5)' >/dev/null &");
system("/tmp/12345/use -e 'select sleep(5)' >/dev/null &");
$output = `$cmd --busy-time 1s --print --run-time 10`;
@@ -59,7 +59,7 @@ ok(
# --iterations was 0, and another bug when --run-time was not respected.
# Do it all over again, this time with --iterations 0.
# Re issue 1181, --iterations no longer exists, but we'll still keep this test.
system("/tmp/12345/use -h127.1 -P12345 -umsandbox -pmsandbox -e 'select sleep(10)' >/dev/null&");
system("/tmp/12345/use -e 'select sleep(10)' >/dev/null&");
$output = `$cmd --busy-time 1s --print --run-time 11s`;
@times = $output =~ m/\(Query (\d+) sec\)/g;
ok(

View File

@@ -38,7 +38,7 @@ my $cnf='/tmp/12345/my.sandbox.cnf';
# TODO: These tests need something to match, so we background
# a SLEEP(4) query and match that, but this isn't ideal because
# it's time-based. Better is to use a specific db and --match-db.
my $sys_cmd = "/tmp/12345/use -h127.1 -P12345 -umsandbox -pmsandbox -e 'select sleep(4)' >/dev/null 2>&1 &";
my $sys_cmd = "/tmp/12345/use -e 'select sleep(4)' >/dev/null 2>&1 &";
# #############################################################################
# Test that --kill kills the connection.
@@ -86,7 +86,7 @@ ok(
# Here's how this works. This cmd is going to try 2 queries on the same
# connection: sleep5 and sleep3. --kill-query will kill sleep5 causing
# sleep3 to start using the same connection id (pid).
system("/tmp/12345/use -h127.1 -P12345 -umsandbox -pmsandbox -e 'select sleep(5); select sleep(3)' >/dev/null&");
system("/tmp/12345/use -e 'select sleep(5); select sleep(3)' >/dev/null&");
sleep 0.5;
$rows = $dbh->selectall_hashref('show processlist', 'id');
$pid = 0; # reuse, reset

View File

@@ -178,8 +178,8 @@ is(
# Use the --replicate table created by the previous ^ tests.
# Create a user that can't create the --replicate table.
diag(`/tmp/12345/use -uroot -pmsandbox < $trunk/t/lib/samples/ro-checksum-user.sql`);
diag(`/tmp/12345/use -uroot -pmsandbox -e "GRANT REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO ro_checksum_user\@'%'"`);
diag(`/tmp/12345/use -uroot < $trunk/t/lib/samples/ro-checksum-user.sql`);
diag(`/tmp/12345/use -uroot -e "GRANT REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO ro_checksum_user\@'%'"`);
# Remove the --replicate table from slave1 and slave2,
# so it's only on the master...
@@ -199,7 +199,7 @@ like(
"CREATE DATABASE error and db is missing on slaves (bug 1039569)"
);
diag(`/tmp/12345/use -uroot -pmsandbox -e "DROP USER ro_checksum_user\@'%'"`);
diag(`/tmp/12345/use -uroot -e "DROP USER ro_checksum_user\@'%'"`);
# #############################################################################
# Done.