Fix TableParser.t modifying mysql.user and mysql.db, and pt-online-schema-change/basics.t modifying mysql.proc.

This commit is contained in:
Daniel Nichter
2012-06-05 11:51:33 -07:00
parent 5d8b2956a0
commit 04d6a51074
3 changed files with 9 additions and 1 deletions

View File

@@ -623,7 +623,6 @@ SKIP: {
{ PrintError => 0, RaiseError => 1 });
$root_dbh->do("GRANT SELECT ON test.* TO 'user'\@'\%'");
$root_dbh->do('FLUSH PRIVILEGES');
$root_dbh->disconnect();
my $user_dbh = DBI->connect(
"DBI:mysql:host=127.0.0.1;port=12345", 'user', undef,
@@ -697,6 +696,9 @@ SKIP: {
);
$user_dbh->disconnect();
$root_dbh->do("DROP USER 'user'\@'\%'");
$root_dbh->disconnect();
};
SKIP: {

View File

@@ -662,6 +662,7 @@ test_alter_table(
# #############################################################################
# Done.
# #############################################################################
$master_dbh->do("UPDATE mysql.proc SET created='2012-06-05 00:00:00', modified='2012-06-05 00:00:00'");
$sb->wipe_clean($master_dbh);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
exit;

View File

@@ -39,6 +39,11 @@ my $dbh = DBI->connect(
ShowErrorStatement => 0,
});
# pt-online-schema-change changes sakila tables, causing MySQL to rebuild
# the procs and update the ts. Tests must exec this statement again else
# Sandbox::ok() will throw "ERROR: Tables are different on master: mysql.proc"
$dbh->do("UPDATE mysql.proc SET created='2012-06-05 00:00:00', modified='2012-06-05 00:00:00'");
my @tables_in_mysql = @{$dbh->selectcol_arrayref('SHOW TABLES FROM mysql')};
my @tables_in_sakila = qw( actor address category city country customer
film film_actor film_category film_text inventory