mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge
Makefile.am: Auto merged client/Makefile.am: Auto merged client/mysqldump.c: Auto merged configure.in: Auto merged include/my_global.h: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/sql_parse.cc: SCCS merged
This commit is contained in:
@ -256,7 +256,7 @@ static struct my_option my_long_options[] =
|
||||
"any action on logs will happen at the exact moment of the dump."
|
||||
"Option automatically turns --lock-tables off.",
|
||||
(gptr*) &opt_master_data, (gptr*) &opt_master_data, 0,
|
||||
GET_UINT, REQUIRED_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0},
|
||||
GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0},
|
||||
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "",
|
||||
(gptr*) &opt_max_allowed_packet, (gptr*) &opt_max_allowed_packet, 0,
|
||||
GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096,
|
||||
@ -552,6 +552,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
case '?':
|
||||
usage();
|
||||
exit(0);
|
||||
case (int) OPT_MASTER_DATA:
|
||||
if (!argument) /* work like in old versions */
|
||||
opt_master_data= MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL;
|
||||
break;
|
||||
case (int) OPT_OPTIMIZE:
|
||||
extended_insert= opt_drop= opt_lock= quick= create_options=
|
||||
opt_disable_keys= lock_tables= opt_set_charset= 1;
|
||||
@ -2149,8 +2153,18 @@ static int do_show_master_status(MYSQL *mysql_con)
|
||||
|
||||
static int do_flush_tables_read_lock(MYSQL *mysql_con)
|
||||
{
|
||||
/*
|
||||
We do first a FLUSH TABLES. If a long update is running, the FLUSH TABLES
|
||||
will wait but will not stall the whole mysqld, and when the long update is
|
||||
done the FLUSH TABLES WITH READ LOCK will start and succeed quickly. So,
|
||||
FLUSH TABLES is to lower the probability of a stage where both mysqldump
|
||||
and most client connections are stalled. Of course, if a second long
|
||||
update starts between the two FLUSHes, we have that bad stall.
|
||||
*/
|
||||
return
|
||||
mysql_query_with_error_report(mysql_con, 0, "FLUSH TABLES WITH READ LOCK");
|
||||
( mysql_query_with_error_report(mysql_con, 0, "FLUSH TABLES") ||
|
||||
mysql_query_with_error_report(mysql_con, 0,
|
||||
"FLUSH TABLES WITH READ LOCK") );
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user