Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6344

mysqldump issues FLUSH TABLES, which gets written into binlog and replicated

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.5.38, 10.0.11
    • Fix Version/s: 10.0.13
    • Component/s: None
    • Labels:

      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.

        Attachments

          Activity

            People

            • Assignee:
              knielsen Kristian Nielsen
              Reporter:
              knielsen Kristian Nielsen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: