summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Fischer <df@sun.com>2010-04-21 14:58:09 +0200
committerDaniel Fischer <df@sun.com>2010-04-21 14:58:09 +0200
commitb83e1c868622125ff59d405710cb6438c131a7f4 (patch)
tree4fad82e285f056995b626f0a62b5fa0488294c19 /scripts
parent718ee3e595d3c73517c1bc1df8d3bdfc2e22510b (diff)
parent210d37e5c0aaa821783023b3f275c5e7992c515c (diff)
downloadmariadb-git-b83e1c868622125ff59d405710cb6438c131a7f4.tar.gz
Merge
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/CMakeLists.txt67
-rw-r--r--scripts/Makefile.am3
-rwxr-xr-xscripts/make_win_bin_dist8
-rw-r--r--scripts/mysql_install_db.sh6
-rw-r--r--scripts/mysql_system_tables.sql84
-rw-r--r--scripts/mysqld_multi.sh22
-rw-r--r--scripts/mysqld_safe.sh10
-rw-r--r--scripts/mysqlhotcopy.sh39
8 files changed, 162 insertions, 77 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 58412a9140e..6a6a6c9fbf8 100755
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -20,31 +20,41 @@ IF(NOT CMAKE_CROSSCOMPILING)
TARGET_LINK_LIBRARIES(comp_sql)
ENDIF()
-SET(FIX_PRIVS_IN
- ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables.sql
- ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables_fix.sql
-)
-SET(FIX_PRIVILEGES_SQL
- ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables.sql
-)
# Build mysql_fix_privilege_tables.sql (concatenate 2 sql scripts)
-FILE(WRITE ${FIX_PRIVILEGES_SQL} "")
-FOREACH(FILENAME ${FIX_PRIVS_IN})
- FILE(READ "${FILENAME}" CONTENTS)
- FILE(APPEND ${FIX_PRIVILEGES_SQL} "${CONTENTS}")
-ENDFOREACH()
+IF(NOT WIN32 OR CMAKE_CROSSCOMPILING)
+ FIND_PROGRAM(CAT_EXECUTABLE cat DOC "path to the executable")
+ENDIF()
+IF(CAT_EXECUTABLE)
+ SET(CAT_COMMAND COMMAND
+ ${CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CAT_EXECUTABLE} mysql_system_tables.sql mysql_system_tables_fix.sql >
+ ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables.sql
+ )
+ELSEIF(WIN32)
+ FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables.sql
+ native_outfile )
+ SET(CAT_COMMAND
+ COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_SOURCE_DIR}
+ cmd /c copy /b mysql_system_tables.sql + mysql_system_tables_fix.sql
+ ${native_outfile} )
+ELSE()
+ MESSAGE(FATAL_ERROR "Cannot concatenate files")
+ENDIF()
# Build mysql_fix_privilege_tables.c
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables_sql.c
+ ${CAT_COMMAND}
COMMAND comp_sql
mysql_fix_privilege_tables
mysql_fix_privilege_tables.sql
mysql_fix_privilege_tables_sql.c
- DEPENDS comp_sql
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ DEPENDS comp_sql
+ ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables.sql
+ ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables_fix.sql
)
# Add target for the above to be built
@@ -66,6 +76,7 @@ INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables_data.sql
${CMAKE_CURRENT_SOURCE_DIR}/fill_help_tables.sql
${CMAKE_CURRENT_SOURCE_DIR}/mysql_test_data_timezone.sql
+ ${FIX_PRIVILEGES_SQL}
DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server
)
@@ -102,9 +113,9 @@ ENDIF()
IF(NOT FIND_PROC)
# BSD style
EXECUTE_PROCESS(COMMAND ps -uaxww OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result)
- IF(result MATCHES 0)
+ IF(result MATCHES 0)
SET( FIND_PROC
- "ps -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- "\$MYSQLD\" | grep \" $PID \" > /dev/null")
+ "ps -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"$MYSQLD\" | grep \" $PID \" > /dev/null")
ENDIF()
ENDIF()
@@ -112,26 +123,20 @@ IF(NOT FIND_PROC)
# SysV style
EXECUTE_PROCESS(COMMAND ps -ef OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result)
IF(result MATCHES 0)
- SET( FIND_PROC "ps -ef | grep -v \" grep\" | grep -v mysqld_safe | grep -- "\$MYSQLD\" | grep \" $PID \" > /dev/null")
+ SET( FIND_PROC "ps -ef | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"$MYSQLD\" | grep \" $PID \" > /dev/null")
ENDIF()
ENDIF()
-EXECUTE_PROCESS(COMMAND sh -c "kill -0 $$" OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result2)
-IF(result3 MATCHES 0)
+EXECUTE_PROCESS(COMMAND sh -c "kill -0 $$" OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result)
+IF(result MATCHES 0)
SET(CHECK_PID "kill -0 $PID > /dev/null 2> /dev/null")
ELSE()
- EXECUTE_PROCESS(COMMAND sh -c "kill -s 0 $$" OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE result3)
- IF(result4 MATCHES 0)
- SET(CHECK_PID "kill -s 0 $PID > /dev/null 2> /dev/null")
- ELSE()
- SET(CHECK_PID "kill -s SIGCONT $PID > /dev/null 2> /dev/null")
- ENDIF()
+ SET(CHECK_PID "kill -s SIGCONT $PID > /dev/null 2> /dev/null")
ENDIF()
-ENDIF(UNIX)
-
-
+SET(HOSTNAME "hostname")
+ENDIF(UNIX)
# Really ugly, one script, "mysql_install_db", needs prefix set to ".",
# i.e. makes access relative the current directory. This matches
@@ -157,7 +162,7 @@ ENDIF()
IF(UNIX)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh
${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY)
- SET(DEST ${INSTALL_BINDIR})
+ SET(DEST ${INSTALL_SCRIPTDIR})
SET(EXT)
ELSE()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.pl.in
@@ -254,7 +259,8 @@ IF(WIN32)
SET(PLIN_FILES mysql_config mysql_secure_installation)
# Input files with .sh extension
- SET(SH_FILES mysql_convert_table_format mysqld_multi)
+ SET(SH_FILES mysql_convert_table_format mysqld_multi mysqldumpslow
+ mysqlhotcopy)
FOREACH(file ${PLIN_FILES})
IF(NOT ${file}_COMPONENT)
@@ -281,14 +287,13 @@ ELSE()
mysql_secure_installation
mysql_zap
mysqlaccess
+ mysqlaccess.conf
mysqlbug
mysql_convert_table_format
mysql_find_rows
mysqlhotcopy
mysqldumpslow
mysqld_multi
- mysqlaccess
- mysqlaccess.conf
mysqld_safe
)
FOREACH(file ${BIN_SCRIPTS})
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index dac073d00c1..118c312d218 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -112,7 +112,8 @@ mysqlbug: ${top_builddir}/config.status mysqlbug.sh
mysql_fix_privilege_tables.sql: mysql_system_tables.sql \
mysql_system_tables_fix.sql
@echo "Building $@";
- @cat $(srcdir)/mysql_system_tables.sql $(srcdir)/mysql_system_tables_fix.sql > $@
+ @cat $(srcdir)/mysql_system_tables.sql \
+ $(srcdir)/mysql_system_tables_fix.sql > $@
#
# Build mysql_fix_privilege_tables_sql.c from
diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist
index 0cbbd5db283..7e8428bfe5c 100755
--- a/scripts/make_win_bin_dist
+++ b/scripts/make_win_bin_dist
@@ -158,7 +158,6 @@ cp tests/$TARGET/*.exe $DESTDIR/bin/
cp libmysql/$TARGET/libmysql.dll $DESTDIR/bin/
cp sql/$TARGET/mysqld.exe $DESTDIR/bin/mysqld$EXE_SUFFIX.exe
-cp sql/$TARGET/mysqld.map $DESTDIR/bin/mysqld$EXE_SUFFIX.map || /bin/true
if [ x"$TARGET" != x"release" ] ; then
cp sql/$TARGET/mysqld.pdb $DESTDIR/bin/mysqld$EXE_SUFFIX.pdb
fi
@@ -167,7 +166,6 @@ if [ x"$PACK_DEBUG" = x"" -a -f "sql/debug/mysqld.exe" -o \
x"$PACK_DEBUG" = x"yes" ] ; then
cp sql/debug/mysqld.exe $DESTDIR/bin/mysqld-debug.exe
cp sql/debug/mysqld.pdb $DESTDIR/bin/mysqld-debug.pdb
- cp sql/debug/mysqld.map $DESTDIR/bin/mysqld-debug.map
fi
# ----------------------------------------------------------------------
@@ -397,15 +395,15 @@ cp scripts/*.sql $DESTDIR/share/
# Clean up from possibly copied SCCS directories
# ----------------------------------------------------------------------
-rm -rf `find $DISTDIR -type d -name SCCS -print`
+rm -rf `find $DESTDIR -type d -name SCCS -print`
# ----------------------------------------------------------------------
# Copy other files specified on command line DEST=SOURCE
# ----------------------------------------------------------------------
for arg do
- dst=`echo $arg | sed 's/=.*$//'`
- src=`echo $arg | sed 's/^.*=//'`
+ dst=`echo $arg | sed -n 's/=.*$//p'`
+ src=`echo $arg | sed -n 's/^.*=//p'`
if [ x"$dst" = x"" -o x"$src" = x"" ] ; then
echo "Invalid specification of what to copy"
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index b4cfc054b35..be594b42ea2 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -416,8 +416,7 @@ else
echo "Try 'mysqld --help' if you have problems with paths. Using --log"
echo "gives you a log in $ldata that may be helpful."
echo
- echo "The latest information about MySQL is available on the web at"
- echo "http://www.mysql.com/. Please consult the MySQL manual section"
+ echo "Please consult the MySQL manual section"
echo "'Problems running mysql_install_db', and the manual section that"
echo "describes problems on your OS. Another information source are the"
echo "MySQL email archives available at http://lists.mysql.com/."
@@ -476,9 +475,6 @@ then
echo
echo "Please report any problems with the $scriptdir/mysqlbug script!"
echo
- echo "The latest information about MySQL is available at http://www.mysql.com/"
- echo "Support MySQL by buying support/licenses from http://shop.mysql.com/"
- echo
fi
exit 0
diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql
index bcbedae4d0f..69d6d6d7feb 100644
--- a/scripts/mysql_system_tables.sql
+++ b/scripts/mysql_system_tables.sql
@@ -1,4 +1,4 @@
--- Copyright (C) 2008-2009 Sun Microsystems, Inc
+-- Copyright (C) 2008, 2010 Oracle and/or its affiliates. All rights reserved.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@@ -100,18 +100,92 @@ CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_b
CREATE TABLE IF NOT EXISTS ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM;
+--
+-- PERFORMANCE SCHEMA INSTALLATION
+-- Note that this script is also reused by mysql_upgrade,
+-- so we have to be very careful here to not destroy any
+-- existing database named 'performance_schema' if it
+-- can contain user data.
+-- In case of downgrade, it's ok to drop unknown tables
+-- from a future version, as long as they belong to the
+-- performance schema engine.
+--
+
+set @have_old_pfs= (select count(*) from information_schema.schemata where schema_name='performance_schema');
+
+SET @l1="SET @broken_tables = (select count(*) from information_schema.tables";
+SET @l2=" where engine != \'PERFORMANCE_SCHEMA\' and table_schema=\'performance_schema\')";
+SET @cmd=concat(@l1,@l2);
+
+-- Work around for bug#49542
+SET @str = IF(@have_old_pfs = 1, @cmd, 'SET @broken_tables = 0');
+PREPARE stmt FROM @str;
+EXECUTE stmt;
+DROP PREPARE stmt;
+
+SET @l1="SET @broken_views = (select count(*) from information_schema.views";
+SET @l2=" where table_schema='performance_schema')";
+SET @cmd=concat(@l1,@l2);
+
+-- Work around for bug#49542
+SET @str = IF(@have_old_pfs = 1, @cmd, 'SET @broken_views = 0');
+PREPARE stmt FROM @str;
+EXECUTE stmt;
+DROP PREPARE stmt;
+
+SET @broken_routines = (select count(*) from mysql.proc where db='performance_schema');
+
+SET @broken_events = (select count(*) from mysql.event where db='performance_schema');
+
+SET @broken_pfs= (select @broken_tables + @broken_views + @broken_routines + @broken_events);
--
-- The performance schema database.
--- This database is always created, even in --without-perfschema builds,
+-- Only drop and create the database if this is safe (no broken_pfs).
+-- This database is created, even in --without-perfschema builds,
-- so that the database name is always reserved by the MySQL implementation.
--
-set @have_pfs= (select count(engine) from information_schema.engines where engine='PERFORMANCE_SCHEMA' and support != 'NO');
+SET @cmd= "DROP DATABASE IF EXISTS performance_schema";
+
+SET @str = IF(@broken_pfs = 0, @cmd, 'SET @dummy = 0');
+PREPARE stmt FROM @str;
+EXECUTE stmt;
+DROP PREPARE stmt;
-DROP DATABASE IF EXISTS performance_schema;
+SET @cmd= "CREATE DATABASE performance_schema character set utf8";
-CREATE DATABASE performance_schema character set utf8;
+SET @str = IF(@broken_pfs = 0, @cmd, 'SET @dummy = 0');
+PREPARE stmt FROM @str;
+EXECUTE stmt;
+DROP PREPARE stmt;
+
+--
+-- Unlike 'performance_schema', the 'mysql' database is reserved already,
+-- so no user procedure is supposed to be there
+--
+drop procedure if exists mysql.die;
+create procedure mysql.die() signal sqlstate 'HY000' set message_text='Unexpected content found in the performance_schema database.';
+
+--
+-- For broken upgrades, SIGNAL the error
+--
+
+SET @cmd="call mysql.die()";
+
+SET @str = IF(@broken_pfs > 0, @cmd, 'SET @dummy = 0');
+PREPARE stmt FROM @str;
+EXECUTE stmt;
+DROP PREPARE stmt;
+
+drop procedure mysql.die;
+
+--
+-- From this point, only create the performance schema tables
+-- if the server is build with performance schema
+--
+
+set @have_pfs= (select count(engine) from information_schema.engines where engine='PERFORMANCE_SCHEMA' and support != 'NO');
--
-- TABLE COND_INSTANCES
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index 430c74874eb..588c48fae4c 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -59,18 +59,6 @@ sub main
push @defaults_options, (shift @ARGV);
}
- # Handle deprecated --config-file option: convert to --defaults-extra-file
- foreach my $arg (@ARGV)
- {
- if ($arg =~ m/^--config-file=(.*)/)
- {
- # Put it at the beginning of the list, so it has lower precedence
- # than a correct --defaults-extra-file option
-
- unshift @defaults_options, "--defaults-extra-file=$1";
- }
- }
-
foreach (@defaults_options)
{
$_ = quote_shell_word($_);
@@ -79,11 +67,6 @@ sub main
# Add [mysqld_multi] options to front of @ARGV, ready for GetOptions()
unshift @ARGV, defaults_for_group('mysqld_multi');
- # The --config-file option can be ignored; if passed on the command
- # line, it's already handled; if specified in the configuration file,
- # it's redundant and not useful
- @ARGV= grep { not /^--config-file=/ } @ARGV;
-
# We've already handled --no-defaults, --defaults-file, etc.
if (!GetOptions("help", "example", "version", "mysqld=s", "mysqladmin=s",
"user=s", "password=s", "log=s", "no-log",
@@ -740,8 +723,8 @@ from both [mysqld_multi] and [mysqld#], a group that is tried to be
used, $my_progname will abort with an error.
$my_progname will search for groups named [mysqld#] from my.cnf (or
-the given --config-file=...), where '#' can be any positive integer
-starting from 1. These groups should be the same as the regular
+the given --defaults-extra-file=...), where '#' can be any positive
+integer starting from 1. These groups should be the same as the regular
[mysqld] group, but with those port, socket and any other options
that are to be used with each separate mysqld process. The number
in the group name has another function; it can be used for starting,
@@ -767,7 +750,6 @@ These options must be given before any others:
standard system-wide and user-specific files
Using: @{[join ' ', @defaults_options]}
---config-file=... Deprecated, please use --defaults-extra-file instead
--example Give an example of a config file with extra information.
--help Print this help and exit.
--log=... Log file. Full path to and the name for the log file. NOTE:
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index f08e870d5e0..019706467b0 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -54,6 +54,8 @@ Usage: $0 [OPTIONS]
--mysqld=FILE Use the specified file as mysqld
--mysqld-version=VERSION Use "mysqld-VERSION" as mysqld
--nice=NICE Set the scheduling priority of mysqld
+ --plugin-dir=DIR Plugins are under DIR or DIR/VERSION, if
+ VERSION is given
--skip-kill-mysqld Don't try to kill stray mysqld processes
--syslog Log messages to syslog with 'logger'
--skip-syslog Log messages to error log (default)
@@ -172,6 +174,7 @@ parse_arguments() {
--basedir=*) MY_BASEDIR_VERSION="$val" ;;
--datadir=*) DATADIR="$val" ;;
--pid-file=*) pid_file="$val" ;;
+ --plugin-dir=*) PLUGIN_DIR="$val" ;;
--user=*) user="$val"; SET_USER=1 ;;
# these might have been set in a [mysqld_safe] section of my.cnf
@@ -189,6 +192,7 @@ parse_arguments() {
if test -n "$val"
then
MYSQLD="mysqld-$val"
+ PLUGIN_VARIANT="/$val"
else
MYSQLD="mysqld"
fi
@@ -302,7 +306,7 @@ set_malloc_lib() {
malloc_lib=
# This list is kept intentionally simple. Simply set --malloc-lib
# to a full path if another location is desired.
- for libdir in /usr/lib "$pkglibdir"; do
+ for libdir in /usr/lib "$pkglibdir" "$pkglibdir/mysql"; do
for flavor in _minimal '' _and_profiler _debug; do
tmp="$libdir/libtcmalloc$flavor.so"
#log_notice "DEBUG: Checking for malloc lib '$tmp'"
@@ -695,8 +699,10 @@ fi
cmd="`mysqld_ld_preload_text`$NOHUP_NICENESS"
+plugin_dir="${PLUGIN_DIR:-@pkgplugindir@}${PLUGIN_VARIANT}"
+
for i in "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
- "--datadir=$DATADIR" "$USER_OPTION"
+ "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
do
cmd="$cmd "`shell_quote_string "$i"`
done
diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh
index 21fca0c0848..90f759739d0 100644
--- a/scripts/mysqlhotcopy.sh
+++ b/scripts/mysqlhotcopy.sh
@@ -56,6 +56,8 @@ Usage: $0 db_name[./table_regex/] [new_db_name | directory]
-h, --host=# hostname for local server when connecting over TCP/IP
-P, --port=# port to use when connecting to local server with TCP/IP
-S, --socket=# socket to use when connecting to local server
+ --old_server connect to old MySQL-server (before v5.5) which
+ doesn't have FLUSH TABLES WITH READ LOCK fully implemented.
--allowold don\'t abort if target dir already exists (rename it _old)
--addtodest don\'t rename target dir if it exists, just add files to it
@@ -103,6 +105,7 @@ GetOptions( \%opt,
"password|p=s",
"port|P=s",
"socket|S=s",
+ "old_server",
"allowold!",
"keepold!",
"addtodest!",
@@ -441,21 +444,37 @@ if ( $opt{checkpoint} || $opt{record_log_pos} ) {
my $hc_started = time; # count from time lock is granted
if ( $opt{dryrun} ) {
- print "LOCK TABLES $hc_locks\n";
- print "FLUSH TABLES /*!32323 $hc_tables */\n";
+ if ( $opt{old_server} ) {
+ print "LOCK TABLES $hc_locks\n";
+ print "FLUSH TABLES /*!32323 $hc_tables */\n";
+ }
+ else {
+ print "FLUSH TABLES $hc_tables WITH READ LOCK\n";
+ }
+
print "FLUSH LOGS\n" if ( $opt{flushlog} );
print "RESET MASTER\n" if ( $opt{resetmaster} );
print "RESET SLAVE\n" if ( $opt{resetslave} );
}
else {
my $start = time;
- $dbh->do("LOCK TABLES $hc_locks");
- printf "Locked $num_tables tables in %d seconds.\n", time-$start unless $opt{quiet};
- $hc_started = time; # count from time lock is granted
+ if ( $opt{old_server} ) {
+ $dbh->do("LOCK TABLES $hc_locks");
+ printf "Locked $num_tables tables in %d seconds.\n", time-$start unless $opt{quiet};
+ $hc_started = time; # count from time lock is granted
+
+ # flush tables to make on-disk copy up to date
+ $start = time;
+ $dbh->do("FLUSH TABLES /*!32323 $hc_tables */");
+ }
+ else {
+ $dbh->do("FLUSH TABLES $hc_tables WITH READ LOCK");
+ printf "Locked $num_tables tables in %d seconds.\n", time-$start unless $opt{quiet};
+ $hc_started = time; # count from time lock is granted
- # flush tables to make on-disk copy up to date
- $start = time;
- $dbh->do("FLUSH TABLES /*!32323 $hc_tables */");
+ # flush tables to make on-disk copy up to date
+ $start = time;
+ }
printf "Flushed tables ($hc_tables) in %d seconds.\n", time-$start unless $opt{quiet};
$dbh->do( "FLUSH LOGS" ) if ( $opt{flushlog} );
$dbh->do( "RESET MASTER" ) if ( $opt{resetmaster} );
@@ -975,6 +994,10 @@ when using the --host option.
UNIX domain socket to use when connecting to local server.
+=item --old_server
+
+Use old server (pre v5.5) commands.
+
=item --noindices
Don\'t include index files in copy. Only up to the first 2048 bytes