Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
5.5.38, 10.0.11
-
None
Description
mysqldump has this code:
( mysql_query_with_error_report(mysql_con, 0,
|
((opt_master_data != 0) ?
|
"FLUSH /*!40101 LOCAL */ TABLES" :
|
"FLUSH TABLES")) ||
|
The conditional use of LOCAL seems to come from this mysql bug:
http://bugs.mysql.com/bug.php?id=35157
But I think the patch for that bug is rather confused. I do not think there is
ever a reason for mysqldump to issue a FLUSH TABLES that will be written into
the binlog and replicated to slaves. It should always use LOCAL.
This is particularly serious in 10.0+ where we have GTID. In this case, any
attempt to mysqldump a slave will silently inject a local binlogged
transaction on the slave, which causes that slave to have an alternate future
(extra GTID not present on the master), which is generally a bad thing.
So I propose to fix this in 10.0 by using LOCAL unconditionally.