Skip to content
Snippets Groups Projects
Commit 1b781214 authored by Andy Yates's avatar Andy Yates
Browse files

Connect to db for flush

parent a3f2833f
No related branches found
No related tags found
No related merge requests found
......@@ -939,8 +939,16 @@ TABLE:
# Flush tables on target.
if ($opt_flushtarget) {
print("FLUSHING TABLES ON TARGET...\n");
my $tdbh = DBI->connect( $target_dsn,
'ensadmin',
$opt_password, {
'PrintError' => 1,
'AutoCommit' => 0
} );
my $ddl = sprintf('FLUSH TABLES %s', join(q{, }, @tables));
$target_dbh->do($ddl);
$tdbh->do($ddl);
$tdbh->disconnect();
}
} ## end foreach my $spec (@todo)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment