summaryrefslogtreecommitdiff
path: root/scripts/mysqlhotcopy.sh
diff options
context:
space:
mode:
authorunknown <jcole@tetra.spaceapes.com>2000-08-23 07:07:24 -0500
committerunknown <jcole@tetra.spaceapes.com>2000-08-23 07:07:24 -0500
commit451ef26a31374f8b2e150b4b63e074d093eb3a56 (patch)
tree4f4db7436427dbd1781fe757f75830236ea6f9a9 /scripts/mysqlhotcopy.sh
parent11f402b3108b0c6ef5744bd13164607dd9fba3c0 (diff)
downloadmariadb-git-451ef26a31374f8b2e150b4b63e074d093eb3a56.tar.gz
Updated mysqlhotcopy to use the new ``FLUSH TABLES table_list'' syntax.
Docs/manual.texi: ChangeLog entry for mysqlhotcopy update. scripts/mysqlhotcopy.sh: Updated to use the new ``FLUSH TABLES table_list'' syntax.
Diffstat (limited to 'scripts/mysqlhotcopy.sh')
-rwxr-xr-xscripts/mysqlhotcopy.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh
index bc150ff61a5..2084a0b2c02 100755
--- a/scripts/mysqlhotcopy.sh
+++ b/scripts/mysqlhotcopy.sh
@@ -25,7 +25,7 @@ WARNING: THIS IS VERY MUCH A FIRST-CUT ALPHA. Comments/patches welcome.
# Documentation continued at end of file
-my $VERSION = "1.5";
+my $VERSION = "1.6";
my $OPTIONS = <<"_OPTIONS";
@@ -180,6 +180,7 @@ if ( defined $opt{regexp} ) {
# --- get list of tables to hotcopy ---
my $hc_locks = "";
+my $hc_tables = "";
my $num_tables = 0;
my $num_files = 0;
@@ -208,6 +209,7 @@ foreach my $rdb ( @db_desc ) {
$hc_locks .= ", " if ( length $hc_locks && @hc_tables );
$hc_locks .= join ", ", map { "$_ READ" } @hc_tables;
+ $hc_tables .= join ", ", @hc_tables;
$num_tables += scalar @hc_tables;
$num_files += scalar @{$rdb->{files}};
@@ -286,7 +288,7 @@ my $hc_started = time; # count from time lock is granted
if ( $opt{dryrun} ) {
print "LOCK TABLES $hc_locks\n";
- print "FLUSH TABLES\n";
+ print "FLUSH TABLES /*!32323 $hc_tables */\n";
print "FLUSH LOGS\n" if ( $opt{flushlog} );
}
else {
@@ -297,8 +299,8 @@ else {
# flush tables to make on-disk copy uptodate
$start = time;
- $dbh->do("FLUSH TABLES");
- printf "Flushed tables in %d seconds.\n", time-$start unless $opt{quiet};
+ $dbh->do("FLUSH TABLES /*!32323 $hc_tables */");
+ printf "Flushed tables ($hc_tables) in %d seconds.\n", time-$start unless $opt{quiet};
$dbh->do( "FLUSH LOGS" ) if ( $opt{flushlog} );
}