mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 21:19:59 +00:00
Fix TableParser.t modifying mysql.user and mysql.db, and pt-online-schema-change/basics.t modifying mysql.proc.
This commit is contained in:
@@ -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: {
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user