Check for leftover databases. Fix MasterSlave.t so it doesn't leave leftover dbs and it resets 12347.

This commit is contained in:
Daniel Nichter
2012-06-05 18:55:32 -07:00
parent 649ee2c301
commit 2d7cc5e8a4
3 changed files with 31 additions and 11 deletions

View File

@@ -207,8 +207,7 @@ SKIP: {
);
$ro_dbh->disconnect();
diag(`/tmp/12345/use -u root -e "drop user 'ro_checksum_user'\@'%'"`);
diag(`/tmp/12345/use -u root -e "drop user 'ro_checksum_user'\@'%'"`);
}
# #############################################################################
@@ -635,12 +634,16 @@ SKIP: {
"Slave replication filter"
);
diag(`/tmp/12346/stop >/dev/null 2>&1`);
diag(`/tmp/12345/stop >/dev/null 2>&1`);
diag(`/tmp/12346/stop >/dev/null`);
diag(`/tmp/12345/stop >/dev/null`);
diag(`mv /tmp/12346/orig.cnf /tmp/12346/my.sandbox.cnf`);
diag(`mv /tmp/12345/orig.cnf /tmp/12345/my.sandbox.cnf`);
diag(`/tmp/12345/start >/dev/null 2>&1`);
diag(`/tmp/12346/start >/dev/null 2>&1`);
diag(`/tmp/12345/start >/dev/null`);
diag(`/tmp/12346/start >/dev/null`);
diag(`/tmp/12347/use -e "STOP SLAVE; START SLAVE;" >/dev/null`);
$master_dbh = $sb->get_dbh_for('master');
$slave_dbh = $sb->get_dbh_for('slave1');
};
is(
@@ -702,6 +705,7 @@ is(
# #############################################################################
# Done.
# #############################################################################
$sb->wipe_clean($master_dbh);
diag(`$trunk/sandbox/stop-sandbox 2903 2902 2901 2900 >/dev/null 2>&1`);
diag(`/tmp/12346/use -e "set global read_only=1"`);
diag(`/tmp/12347/use -e "set global read_only=1"`);

View File

@@ -68,7 +68,7 @@ is(
$exit_status,
0,
"Bug 995274 (undef array): zero exit status"
);
) or diag($output);
cmp_ok(
PerconaTest::count_checksum_results($output, 'rows'),