Commit ce858166 authored by unknown's avatar unknown

Try to lower the probability of a stall of mysqldump AND most client...

Try to lower the probability of a stall of mysqldump AND most client connections, when mysqldump does a FLUSH TABLES WITH READ LOCK
(doing FLUSH TABLES first).


client/mysqldump.c:
  try to lower the probability of a stall of mysqldump AND most client connections, when mysqldump does a FLUSH TABLES WITH READ LOCK
  (doing FLUSH TABLES first).
parent d6f7134d
......@@ -2050,8 +2050,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") );
}
......
Markdown is supported
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